I have the following LINQ Query. Note that DataValue
is a string
value. I am trying to convert it to a float and then get the average.
var Avg = (from fd in DataContext.FormData
select float.Parse(fd.DataValue)).Average();
I get the following error:
System.NotSupportedException: 'LINQ to Entities does not recognize
the method 'Single Parse(System.String)' method, and this method
cannot be translated into a store expression.'
Is there a good work around to this issue?