Update mongodb

This commit is contained in:
sunkaixuan
2025-07-04 08:36:36 +08:00
parent 19df6e1efc
commit b21e615c5f
2 changed files with 12 additions and 2 deletions

View File

@@ -1,4 +1,6 @@
using System;
using MongoDB.Bson.Serialization.Attributes;
using MongoDB.Bson;
using System;
using System.Collections.Generic;
using System.Text;
@@ -6,6 +8,7 @@ namespace SqlSugar.MongoDb
{
public class MongoDbBase
{
[BsonRepresentation(BsonType.ObjectId)]
[SugarColumn(IsPrimaryKey =true,IsOnlyIgnoreInsert =true,ColumnName ="_id")]
public string Id { get; set; }
}