// update coordinates with name that are given public void PutGeoLocation( GeoLocation geoLocation) { if (!repository.Update(geoLocation)) { throw new ArgumentNullException("Opps ! There is no geolocation with name #"+geoLocation.Name+" !"); } }
public void Post(GeoLocation newGeoLocation) { if (newGeoLocation == null) { throw new ArgumentNullException("Opps ! GeoLocation object is null that was sended !"); } geoLocations.Add(newGeoLocation); }
public bool Update(GeoLocation updatedGeoLocation) { if (updatedGeoLocation == null) { throw new ArgumentNullException("Opps ! GeoLocation object is null that was sended !"); } else { var geoLocation = this.GetByName(updatedGeoLocation.Name); if (geoLocation.Name == "") { return false; } geoLocation.Latitude = updatedGeoLocation.Latitude; geoLocation.Longitude = updatedGeoLocation.Longitude; return true; } }
public void PostGeoLocation(GeoLocation newGeoLocation) { repository.Post(newGeoLocation); }