Update mongodb

This commit is contained in:
sunkaixuan
2025-06-28 09:10:17 +08:00
parent 9d49280e65
commit c8cb8364b7
2 changed files with 44 additions and 14 deletions

View File

@@ -57,13 +57,13 @@ namespace MongoDbTest
}
]");
//var list = db.Queryable<Student>()
// .LeftJoin<School>((x, y) => x.SchoolId == y.Id)
// .Select((x, y) => new
// {
// StudentName = x.Name,
// SchoolName = y.Name
// }).ToList();
var list = db.Queryable<Student>()
.LeftJoin<School>((x, y) => x.SchoolId == y.Id)
.Select((x, y) => new
{
StudentName = x.Name,
SchoolName = y.Name
}).ToList();
}
[SqlSugar.SugarTable("UnitStudent123131")]
public class Student : MongoDbBase