// When the user confirms the delete operation call this protected async Task Confirm_DeleteClick(bool deleteconfirm) { if (deleteconfirm) { await LocationServices.DeleteLocation(Location.id); Navigation.NavigateTo("/Libraries"); } }
public IActionResult DeleteLocation(Location location) { try { _locationServices.DeleteLocation(location); return(CreatedAtAction("DeleteLocation", location)); } catch (Exception) { return(BadRequest()); } }