private void ConfigureDefaultDiscriminator( EntityType entityType, MappingFragment fragment) { if (ValueConditions.Any() || NullabilityConditions.Any()) { var discriminator = fragment.RemoveDefaultDiscriminatorCondition(); if (discriminator != null && entityType.BaseType != null) { discriminator.Nullable = true; } } }
private void ConfigureDefaultDiscriminator( EntityType entityType, StorageMappingFragment fragment, bool isSharingTableWithBase) { if ((entityType.BaseType != null && !isSharingTableWithBase) || ValueConditions.Any() || NullabilityConditions.Any()) { var discriminator = fragment.RemoveDefaultDiscriminatorCondition(); if (discriminator != null && entityType.BaseType != null) { discriminator.Nullable = true; } } }
private void ConfigureConditions( DbDatabaseMapping databaseMapping, EntityType entityType, MappingFragment fragment, DbProviderManifest providerManifest) { if (ValueConditions.Any() || NullabilityConditions.Any()) { fragment.ClearConditions(); foreach (var condition in ValueConditions) { condition.Configure(databaseMapping, fragment, entityType, providerManifest); } foreach (var condition in NullabilityConditions) { condition.Configure(databaseMapping, fragment, entityType); } } }