Update mongodb

This commit is contained in:
sunkaixuan
2025-06-28 17:06:09 +08:00
parent b1cc93912f
commit 44704a068c
3 changed files with 61 additions and 0 deletions

View File

@@ -48,6 +48,10 @@ namespace MongoDbTest
cityName=city.Name
}).ToList();
if (dt.First().schoolName != "清华大学" || dt.First().studentName != "张三" || dt.First().cityName != "北京") Cases.ThrowUnitError();
var dt2 = db.Queryable<Student>()
.LeftJoin<School>((s, sc) => s.SchoolId == sc.Id)
.Select((s, sc) => sc).ToList();
}
[SqlSugar.SugarTable("UnitStudentdu2s31")]
public class Student : MongoDbBase