// 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");
            }
        }
Exemplo n.º 2
0
 public IActionResult DeleteLocation(Location location)
 {
     try
     {
         _locationServices.DeleteLocation(location);
         return(CreatedAtAction("DeleteLocation", location));
     }
     catch (Exception)
     {
         return(BadRequest());
     }
 }