-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