Пример #1
0
        public ActionResult DeletePerson(int personId)
        {
            var personModelFromRepos = _repository.GetPersonById(personId);

            if (personModelFromRepos == null)
            {
                return(NotFound());
            }

            _repository.DeletePerson(personModelFromRepos);
            _repository.SaveChanges();

            return(NoContent());
        }