fix mongo serilaization
This commit is contained in:
parent
5009b97327
commit
931149fc9d
|
|
@ -1,4 +1,3 @@
|
|||
using BotSharp.Abstraction.Utilities;
|
||||
using BotSharp.Plugin.MongoStorage.Collections;
|
||||
|
||||
namespace BotSharp.Plugin.MongoStorage;
|
||||
|
|
|
|||
|
|
@ -1,4 +1,6 @@
|
|||
using BotSharp.Plugin.MongoStorage.Repository;
|
||||
using MongoDB.Bson.Serialization;
|
||||
using MongoDB.Bson.Serialization.Serializers;
|
||||
|
||||
namespace BotSharp.Plugin.MongoStorage;
|
||||
|
||||
|
|
@ -17,6 +19,7 @@ public class MongoStoragePlugin : IBotSharpPlugin
|
|||
|
||||
if (dbSettings.Default == "MongoRepository")
|
||||
{
|
||||
BsonSerializer.RegisterSerializer(new GuidSerializer(GuidRepresentation.Standard));
|
||||
services.AddScoped((IServiceProvider x) =>
|
||||
{
|
||||
var dbSettings = x.GetRequiredService<BotSharpDatabaseSettings>();
|
||||
|
|
|
|||
Loading…
Reference in a new issue