public async Task <IActionResult> Put(Locations value) { var entity = await _service.Update(value); if (entity != null) { return(Ok(entity)); } else { return(BadRequest("something broke")); } }
public IActionResult Put(string id, Location locationIn) { var selectedLocation = _locationsService.Get(id); if (selectedLocation == null) { return(NotFound()); } _locationsService.Update(id, locationIn); return(NoContent()); }