public ActionResult DeleteCommands(int id) { var _commandsDelete = _commandRepo.GetCommandId(id); if (_commandsDelete == null) { return(NotFound()); } _commandRepo.DeleteCommands(_commandsDelete); _commandRepo.Save_Changes(); return(NoContent()); }