public IActionResult Delete(int id) { var Prop = repository.Proprietors.SingleOrDefault(x => x.ID == id); if (Prop == null) { return(NotFound()); } repository.DeleteProprietor(id); return(Get()); }
public IActionResult DeleteProprietor(int proprietorId) { Proprietor deletedProprietor = proprietorRepository.DeleteProprietor(proprietorId); return RedirectToAction("ProprietorList"); }