public static void Configure() { ProductMap.Configure(); // Set Guid to CSharp style (with dash -) BsonDefaults.GuidRepresentation = GuidRepresentation.CSharpLegacy; // Conventions var pack = new ConventionPack { new IgnoreExtraElementsConvention(true), new IgnoreIfDefaultConvention(true) }; ConventionRegistry.Register("My Solution Conventions", pack, t => true); }
public static void Configure() { ProductMap.Configure(); BsonDefaults.GuidRepresentation = GuidRepresentation.CSharpLegacy; //BsonSerializer.RegisterSerializer(new GuidSerializer(GuidRepresentation.CSharpLegacy)); // Conventions var pack = new ConventionPack { new IgnoreExtraElementsConvention(true), new IgnoreIfDefaultConvention(true) }; ConventionRegistry.Register("My Solution Conventions", pack, t => true); }