|
@ -47,6 +47,14 @@ namespace OrmTest |
|
|
var ids2 = db.Insertable(new List<UnitIdentity01>() { new UnitIdentity01() { Name = "c" }, new UnitIdentity01() { Name = "c" } }).ExecuteReturnPkList<int>(); |
|
|
var ids2 = db.Insertable(new List<UnitIdentity01>() { new UnitIdentity01() { Name = "c" }, new UnitIdentity01() { Name = "c" } }).ExecuteReturnPkList<int>(); |
|
|
if (ids2.Count(z => z > 0) != 2) { throw new Exception("unit error"); } |
|
|
if (ids2.Count(z => z > 0) != 2) { throw new Exception("unit error"); } |
|
|
if (db.Queryable<UnitIdentity01>().In(ids2).Count() != 2) { throw new Exception("unit error"); } |
|
|
if (db.Queryable<UnitIdentity01>().In(ids2).Count() != 2) { throw new Exception("unit error"); } |
|
|
|
|
|
var list = new List<UnitIdentity01>(); |
|
|
|
|
|
for (int i = 0; i < 1000; i++) |
|
|
|
|
|
{ |
|
|
|
|
|
list.Add(new UnitIdentity01() { Name = "a" }); |
|
|
|
|
|
} |
|
|
|
|
|
var ids3 = db.Insertable(list).ExecuteReturnPkList<int>(); |
|
|
|
|
|
if (db.Queryable<UnitIdentity01>().In(ids3).Count() != 1000) { throw new Exception("unit error"); } |
|
|
|
|
|
db.DbMaintenance.TruncateTable<UnitIdentity01>(); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
public class UnitGuid123 |
|
|
public class UnitGuid123 |
|
|