Update mongodb demo

This commit is contained in:
sunkaixuan
2025-06-25 14:33:11 +08:00
parent 80a5c25fb3
commit bf1b72cd64
14 changed files with 64 additions and 16 deletions

View File

@@ -11,7 +11,7 @@ namespace MongoDbTest
{
internal static void Init()
{
var db = DBHelper.DbHelper.GetNewDb();
var db = DbHelper.GetNewDb();
db.CodeFirst.InitTables<Student>();
db.DbMaintenance.TruncateTable<Student>();
db.Insertable(new Student() { Age = 1, Name = "tom", SchoolId = "a", Book = new List<Book>() { new Book() { CreateTime = DateTime.Now, Price = 21 } } }).ExecuteCommand();