public IActionResult Edit([FromBody] Location location) { try { return(Ok(_repository.EditLocation(location))); } catch (Exception) { return(BadRequest("Error occured while editing location")); } }