public static Location LoadLocation(System.Guid apiKey) { Locations locations = Locations.LoadLocations("SELECT * FROM Locations WHERE ApiKey=@ApiKey", CommandType.Text, new SqlParameter[] { new SqlParameter("@ApiKey", apiKey) }); if (locations.Count == 0) { return(null); } else { return(locations[0]); } }
public static Locations LoadAllLocations() { return(Locations.LoadLocations("locations_load_all", CommandType.StoredProcedure, null)); }
public static Locations LoadLocationsByUserId(int userId) { return(Locations.LoadLocations("locations_load_by_user_id", CommandType.StoredProcedure, new MySqlParameter[] { new MySqlParameter("@user_id", userId) })); }
public static Locations LoadLocationsByUserId(System.Int32 userId) { return(Locations.LoadLocations("LoadLocationsByUserId", CommandType.StoredProcedure, new SqlParameter[] { new SqlParameter("@UserId", userId) })); }