Entity Framework 6 Code First Custom Functions
问题 I'm trying something similar to this: How to use scalar-valued function with linq to entity? However I'm not using EDMX, but instead just DbContext and code first. I've come across this: https://codefirstfunctions.codeplex.com/ But the usage isn't suitable. What I am trying to achieve is to be able to do this: var locations = context.Locations.Where(e => Functions.LatLongDistanceCalc(e.Lat, e.Long, lat, long) >= 10) Where it will call a scalar function (LatLongDistanceCalc) on SQL Server. Is