Browse Source
Update Guid serializer registration in AbpMongoDbModule
pull/23673/head
maliming
5 months ago
No known key found for this signature in database
GPG Key ID: A646B9CB645ECEA4
1 changed files with
2 additions and
1 deletions
-
framework/src/Volo.Abp.MongoDB/Volo/Abp/MongoDB/AbpMongoDbModule.cs
|
|
|
@ -19,7 +19,8 @@ public class AbpMongoDbModule : AbpModule |
|
|
|
{ |
|
|
|
static AbpMongoDbModule() |
|
|
|
{ |
|
|
|
BsonSerializer.TryRegisterSerializer(new GuidSerializer(GuidRepresentation.Standard)); |
|
|
|
AbpBsonSerializer.RemoveSerializer<Guid>(); |
|
|
|
BsonSerializer.RegisterSerializer(new GuidSerializer(GuidRepresentation.Standard)); |
|
|
|
BsonTypeMapper.RegisterCustomTypeMapper(typeof(Guid), new AbpGuidCustomBsonTypeMapper()); |
|
|
|
} |
|
|
|
|
|
|
|
|