Hello,
I've tried to sum the TimeSpan elements (element.timePeriod here) using the Aggregate:
totTime = grp.Aggregate( TimeSpan.Zero, ( sum, element ) => sum.Add( element.timePeriod ) )
but SD.LLBLGen.Pro.LinqSupportClasses.NET35 raised the exception: 'Aggregate' isn't supported in this Linq provider. Then I found suggestions here and rewrited the expression to:
totTime = TimeSpan.FromSeconds( grp.Sum( x => x.timePeriod.Value.TotalSeconds ) )
Is it the proper approach? If not - can I avoid the conversion TotalSeconds/FromSeconds?