mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-06-28 04:35:29 +08:00
Update mongodb
This commit is contained in:
parent
53d0c73876
commit
7940dbae11
@ -28,6 +28,8 @@ namespace MongoDbTest
|
|||||||
db.Insertable(new Student() { Age = 1, Name = null, SchoolId = "111", CreateDateTime = DateTime.Now }).ExecuteCommand();
|
db.Insertable(new Student() { Age = 1, Name = null, SchoolId = "111", CreateDateTime = DateTime.Now }).ExecuteCommand();
|
||||||
var list2=db.Queryable<Student>().Where(it => it.Name == null).ToList();
|
var list2=db.Queryable<Student>().Where(it => it.Name == null).ToList();
|
||||||
if(list2.Count!=1|| list2.First().Name!=null) Cases.ThrowUnitError();
|
if(list2.Count!=1|| list2.First().Name!=null) Cases.ThrowUnitError();
|
||||||
|
var list3= db.Queryable<Student>().Where(it => null==it.Name).ToList();
|
||||||
|
if (list3.Count != 1 || list3.First().Name != null) Cases.ThrowUnitError();
|
||||||
}
|
}
|
||||||
[SqlSugar.SugarTable("UnitStudent1ddsfhssds3z1")]
|
[SqlSugar.SugarTable("UnitStudent1ddsfhssds3z1")]
|
||||||
public class Student : MongoDbBase
|
public class Student : MongoDbBase
|
||||||
|
Loading…
Reference in New Issue
Block a user