-2
我在相同的顺序得到EF代码第一个项目和种子法如何以完全相同的顺序播种db?
situation2_1.RightActions.Add(new RightAction { ControlName = "HV1226-1", RightState = State.Off });
situation2_1.RightActions.Add(new RightAction { ControlName = "HV1227-1", RightState = State.Off });
situation2_1.RightActions.Add(new RightAction { ControlName = "HV2905-10", RightState = State.Off });
situation2_1.RightActions.Add(new RightAction { ControlName = "FV1010-1", RightState = State.Off });
situation2_1.RightActions.Add(new RightAction { ControlName = "FV1026-1", RightState = State.Off });
situation2_1.RightActions.Add(new RightAction { ControlName = "FV1415-1", RightState = State.Off });
播种数据库记录后,不会在代码中 如何解决这个情况?
你如何确定记录不是“以相同的顺序”。问题是什么?你如何检索记录?你能不能简单地做'按'订单? – user1666620