public bool Delete(int?Id) { var idDel = Get(Id); if (idDel != null) { status = _priorityRepository.Delete(Id); } return(status); }
public ActionResult Delete(int id) { // Usunięcie priorytetu z repozytorium var response = _repository.Delete(id); // Sprawdzenie stanu operacji if (!response.Accepted && TempData != null) { foreach (var err in response.Errors) { Error(err.Message); } } return(RedirectToAction("Index", "Default", new { ctr = "CampaignPriorities" })); }
public ActionResult Delete(Priority priority) { _priority.Delete(priority); _priority.Commit(); return(View()); }
public IActionResult Delete(int id) { _priority.Delete(id); return(RedirectToAction("Index", "Priority")); }