public ActionResult <Command> DeleteCommand(int id) { var commandModelFromRepo = _repository.GetCommandById(id); if (commandModelFromRepo == null) { NotFound(); } _repository.DeleteCommand(commandModelFromRepo); _repository.SaveChanges(); return(NoContent()); }
public ActionResult DeleteCommand(int Id) { var commandModalFromRepo = _repository.GetCommandById(Id); if (commandModalFromRepo == null) { return(NotFound()); } _repository.DeleteCommand(commandModalFromRepo); return(NoContent()); }