public ConventionSet AddConventions(ConventionSet conventionSet) { var discriminatorConvention = new DiscriminatorConvention(); var storeKeyConvention = new StoreKeyConvention(); conventionSet.EntityTypeAddedConventions.Add(storeKeyConvention); conventionSet.EntityTypeAddedConventions.Add(discriminatorConvention); conventionSet.BaseEntityTypeChangedConventions.Add(discriminatorConvention); conventionSet.ForeignKeyOwnershipChangedConventions.Add(storeKeyConvention); return(conventionSet); }
public override ConventionSet CreateConventionSet() { var conventionSet = base.CreateConventionSet(); var discriminatorConvention = new DiscriminatorConvention(); var storeKeyConvention = new StoreKeyConvention(); conventionSet.EntityTypeAddedConventions.Add(storeKeyConvention); conventionSet.EntityTypeAddedConventions.Add(discriminatorConvention); conventionSet.BaseEntityTypeChangedConventions.Add(storeKeyConvention); conventionSet.BaseEntityTypeChangedConventions.Add(discriminatorConvention); conventionSet.ForeignKeyOwnershipChangedConventions.Add(storeKeyConvention); conventionSet.EntityTypeAnnotationChangedConventions.Add(storeKeyConvention); return(conventionSet); }