Totally missed from the book and code snippets - but here it is from the sample site:
Code:
//
// Helper Methods
[EdmFunction("NerdDinnerModel.Store", "DistanceBetween")]
public static double DistanceBetween(double lat1, double long1, double lat2, double long2) {
throw new NotImplementedException("Only call through LINQ expression");
}
public IQueryable<Dinner> NearestDinners(double latitude, double longitude) {
return from d in entities.Dinners
where DistanceBetween(latitude, longitude, d.Latitude, d.Longitude) < 100
select d;
}