public ActionResult DeleteCommand(int id) { var commandModelFromRepo = storageBroker.GetCommandById(id); if (commandModelFromRepo == null) { return(NotFound()); } storageBroker.DeleteCommand(commandModelFromRepo); storageBroker.SaveChanges(); return(NoContent()); }