Esempio n. 1
0
        public ActionResult DeleteCommand(int id)
        {
            var commandModelFromRepo = _repository.GetCommandById(id);

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

            _repository.DeleteCommands(commandModelFromRepo);
            _repository.SaveChanges();

            return(NoContent());
        }