Skip to content

Embed URL

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
public IList<Location> NearbyLocations(decimal latitude, decimal longitude, int distance, int excludeLocationId)
{
var criteria = Session.CreateSQLQuery("exec NearbyLocations @Latitude=:latitude, @Longitude=:longitude, @Distance=:distance, @ExcludeId=:excludeid");
criteria.SetDecimal("latitude", latitude);
criteria.SetDecimal("longitude", longitude);
criteria.SetInt32("distance", distance);
criteria.SetInt32("excludeid", excludeLocationId);
criteria.AddEntity(typeof (Location));
criteria.SetCacheable(true);
var results = criteria.List<Location>().ToList();
return results;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.