Whenever you will try to use Math.Round with LINQ, that time you will face this error:
For translation to SQL, the Math.Round method needs a MidpointRounding parameter. Use 'AwayFromZero' to specify the SQL function ROUND.
To overcome this problem. just do as its saying..
avgRate = Math.Round( (double) rmpd.Average(a => a.reate),1, MidpointRounding.AwayFromZero )
2 comments:
Thanks
Somebody necessarily assist to make severely posts I'd state.
This is the first time I frequented your website page and up to now?
I surprised with the analysis you made to create this particular put up incredible.
Fantastic job!
Post a Comment