示例#1
0
        public ActionResult DeleteCommand(int id)
        {
            var employeeModelFromRepo = _repository.GetEmployeeById(id);

            if (employeeModelFromRepo == null)
            {
                return(NotFound());
            }
            _repository.DeleteCommand(employeeModelFromRepo);
            _repository.SaveChanges();
            return(NoContent());
        }