Update mongodb

This commit is contained in:
sunkaixuan
2025-06-19 16:14:59 +08:00
parent 12ae51653c
commit 8a0c1a3147
2 changed files with 19 additions and 6 deletions

View File

@@ -109,9 +109,11 @@ namespace MongoDbTest
var list11 = db.Queryable<Student>().Select(it => new
{
Age = it.Age > 0 ? it.Age +1: 1,
Age = it.Age > 0 ? it.Age +1: 1,
Age2 = it.Age > 0 ? 2+it.Age : 1,
}).ToList();
if (list11.First().Age != 12) Cases.ThrowUnitError();
if (list11.First().Age2 != 13) Cases.ThrowUnitError();
}
[SqlSugar.SugarTable("UnitStudent1231sds3z1")]
public class Student : MongoDbBase