I have this entity code that is giving me issues, it doens't give an error until I load the page and then the error says. LINQ to Entities does not recognize the method 'Double Acos(Double)' method, and this method cannot be translated into a store expression I am doing the haversine function to get the radius of a point, I know that Math returns a Double thats why I have cast it and I have to use floats as thats the only format the CSV files are in, how can i correct the above error?
var ste = (from s in db.zipss where Math.Acos(Math.Sin(28.46348)
* Math.Sin((float)s.latitude) + Math.Cos(28.46348) * Math.Cos((float)s.longitude -
(-81.3881))) * 3960 <= 5 select s.zipcode).FirstOrDefault();