public IActionResult Delete(int id) { if (_repository.Delete(id)) { return(NoContent()); } return(NotFound()); }
public ActionResult Delete(int?i) { if (Session["UserID"] != null && Session["UserType"].ToString().ToLower() == "chef") { if (i != null) { mRepo.Delete((int)i); } return(RedirectToAction("Index", "Chef")); } return(RedirectToAction("Login", "Home", new { area = "" })); }