mirror of
https://github.com/nsnail/FreeSql.git
synced 2025-04-22 02:32:50 +08:00
update tests
This commit is contained in:
parent
7220877590
commit
3f9cfc1491
@ -26,28 +26,28 @@ namespace FreeSql.Tests
|
|||||||
g.sqlite.Delete<dept_user>().Where("1=1").ExecuteAffrows();
|
g.sqlite.Delete<dept_user>().Where("1=1").ExecuteAffrows();
|
||||||
BaseEntity.Initialization(g.sqlite);
|
BaseEntity.Initialization(g.sqlite);
|
||||||
|
|
||||||
userinfo user = new userinfo { userid = 1 };
|
userinfo user = new userinfo { userid = 1, badgenumber = "", Name="", IDCardNo="" };
|
||||||
user.Insert();
|
user.Insert();
|
||||||
|
|
||||||
user.depts = new List<DEPARTMENTS>(
|
user.depts = new List<DEPARTMENTS>(
|
||||||
new[] {
|
new[] {
|
||||||
new DEPARTMENTS { deptid = 1, deptcode = "01" },
|
new DEPARTMENTS { deptid = 1, deptcode = "01", deptname = "" },
|
||||||
new DEPARTMENTS { deptid = 2, deptcode = "02" },
|
new DEPARTMENTS { deptid = 2, deptcode = "02", deptname = "" },
|
||||||
new DEPARTMENTS { deptid = 3, deptcode = "03" },
|
new DEPARTMENTS { deptid = 3, deptcode = "03" , deptname = ""},
|
||||||
});
|
});
|
||||||
user.SaveMany("depts");
|
user.SaveMany("depts");
|
||||||
|
|
||||||
user.depts = new List<DEPARTMENTS>(
|
user.depts = new List<DEPARTMENTS>(
|
||||||
new[] {
|
new[] {
|
||||||
new DEPARTMENTS { deptid = 1, deptcode = "01" },
|
new DEPARTMENTS { deptid = 1, deptcode = "01", deptname = "" },
|
||||||
new DEPARTMENTS { deptid = 2, deptcode = "02" },
|
new DEPARTMENTS { deptid = 2, deptcode = "02", deptname = "" },
|
||||||
new DEPARTMENTS { deptid = 4, deptcode = "04" },
|
new DEPARTMENTS { deptid = 4, deptcode = "04", deptname = "" },
|
||||||
});
|
});
|
||||||
user.SaveMany("depts");
|
user.SaveMany("depts");
|
||||||
|
|
||||||
user.depts = new List<DEPARTMENTS>(
|
user.depts = new List<DEPARTMENTS>(
|
||||||
new[] {
|
new[] {
|
||||||
new DEPARTMENTS { deptid = 2, deptcode = "02" },
|
new DEPARTMENTS { deptid = 2, deptcode = "02", deptname = "" },
|
||||||
});
|
});
|
||||||
user.SaveMany("depts");
|
user.SaveMany("depts");
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user