//[HttpDelete] public async Task <ActionResult> RemoveAddress(int addressId) { var result = await _apiProvider.DeleteItemAsync($"{_uri}/{addressId}", "entityType=61"); if (string.IsNullOrWhiteSpace(result)) { return(Content("")); } else { return(Content("Error removing address")); } }
public async Task <ActionResult> DeleteChurch(int id) { try { var result = await _apiProvider.DeleteItemAsync($"{_uri}/{id.ToString()}?entityType=55"); if (string.IsNullOrWhiteSpace(result)) { return(RedirectToAction("Index")); } else { return(Content("Error deleting church")); } } catch (Exception ex) { return(Content("Error deleting church: " + ex.Message)); } }