public IActionResult Delete(int id)
        {
            var Prop = repository.Proprietors.SingleOrDefault(x => x.ID == id);

            if (Prop == null)
            {
                return(NotFound());
            }
            repository.DeleteProprietor(id);
            return(Get());
        }
示例#2
0
        public IActionResult DeleteProprietor(int proprietorId)
        {
            Proprietor deletedProprietor = proprietorRepository.DeleteProprietor(proprietorId);

            return RedirectToAction("ProprietorList");
        }