public ConventionProfile SetIgnoreExtraElementsConvention(IIgnoreExtraElementsConvention convention) { IgnoreExtraElementsConvention = convention; return this; }
public static void ConfigureMapping() { var conventionsProfile = new ConventionProfile(); conventionsProfile.SetIgnoreExtraElementsConvention(new AlwaysIgnoreExtraElementsConvention()); conventionsProfile.SetIdMemberConvention(new NamedIdMemberConvention("Id")); BsonClassMap.RegisterConventions(conventionsProfile, t => typeof(ISagaEntity).IsAssignableFrom(t)); }