public async Task <Response> DeleteABook(int bookID) { Response response = new Response(); if (bookID == 0) { return(response); } var result = await _repositoryCommand.Delete(bookID); response.Data = result; return(response); }
public async Task <Response> Delete(int id) { var response = new Response(); if (id == 0) { return(response); } var result = await _repositoryCommand.Delete(id); response.Data = result; return(response); }
public ActionResult Delete(int id, Permission permission) { try { _permissionCommand.Delete(id); _permissionCommand.Save(); TempData["MESSAGE"] = "Permission " + permission.Name + " was successfully deleted"; ModelState.Clear(); return(RedirectToAction("Index")); } catch (Exception exp) { _log.Error(exp); return(View("Error")); } }