BotSharp/src/Plugins/BotSharp.Plugin.MongoStorage/MongoBase.cs
Jicheng Lu 60d9f47356 1. use string id in mongo collection.
2. add samples
3. refine repo api
2023-10-19 17:27:51 -05:00

12 lines
300 B
C#

using MongoDB.Bson.Serialization.Attributes;
using MongoDB.Bson.Serialization.IdGenerators;
namespace BotSharp.Plugin.MongoStorage;
[BsonIgnoreExtraElements(Inherited = true)]
public class MongoBase
{
[BsonId(IdGenerator = typeof(StringObjectIdGenerator))]
public string Id { get; set; }
}