public ActionResult <Location> Update(int id, Location location) { Location existingLocation = _dao.Get(id); if (existingLocation == null) { return(NotFound("Location does not exist, please try harder")); } Location result = _dao.Update(id, location); return(Ok(result)); }
public IResult Update(Location location) { _locationDao.Update(location); return(new SuccessResult(true, ResultMessages.LocationUpdated)); }