常用方法
常用方法
常用方法
常用方法
public ActionResult DeleteCommandById(int id) { var commandToDelete = _context.GetCommandById(id); if (commandToDelete == null) { return(NotFound()); } _context.DeleteCommandById(commandToDelete); return(Ok($"Deleted command with Id {commandToDelete.Id}")); }