mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-09-20 18:48:09 +08:00
Update mongodb
This commit is contained in:
@@ -72,6 +72,18 @@ namespace MongoDbTest
|
|||||||
Age = 2
|
Age = 2
|
||||||
}).ToList();
|
}).ToList();
|
||||||
if (list6.First().Age != 2) Cases.ThrowUnitError();
|
if (list6.First().Age != 2) Cases.ThrowUnitError();
|
||||||
|
|
||||||
|
var list7 = db.Queryable<Student>().Select(it => new Student()
|
||||||
|
{
|
||||||
|
Age = true?2:1
|
||||||
|
}).ToList();
|
||||||
|
if (list7.First().Age != 2) Cases.ThrowUnitError();
|
||||||
|
|
||||||
|
var list8 = db.Queryable<Student>().Select(it => new Student()
|
||||||
|
{
|
||||||
|
Age = true ? it.Age : it.Age
|
||||||
|
}).ToList();
|
||||||
|
if (list8.First().Age != 11) Cases.ThrowUnitError();
|
||||||
}
|
}
|
||||||
[SqlSugar.SugarTable("UnitStudent1231sds3z1")]
|
[SqlSugar.SugarTable("UnitStudent1231sds3z1")]
|
||||||
public class Student : MongoDbBase
|
public class Student : MongoDbBase
|
||||||
|
Reference in New Issue
Block a user