You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
My scenario was this:
I have an ApplicationUser class which derives from IdentityUser. I would like to use a table-per-hierarchy inheritance model (all classes in the same table) in order not to generate unnecessary tables in the db.
However, it's not possible to achieve by using the MappingHelper class. Although, I can provide an additional type to map, I have no control over the mapping. For example, I needed to generate the discriminator column in the IdentityUserMap and then provide discriminator value in the ApplicationUserMap.
Moreover, the schema that gets generated for the ApplicationUser table is not very good - no foreign keys or indexes. I suppose this is because I can't supply ClassMapping to the ConventionModelBuilder so it uses some basic conventions only to map property to columns.
Would you consider providing a way to pass not only additional types to map, but also additional mapping types themselves (e.g. classes deriving from ClassMapping)? This way I could extend your mappings and provide mine as well.
The text was updated successfully, but these errors were encountered:
My scenario was this:
I have an ApplicationUser class which derives from IdentityUser. I would like to use a table-per-hierarchy inheritance model (all classes in the same table) in order not to generate unnecessary tables in the db.
However, it's not possible to achieve by using the MappingHelper class. Although, I can provide an additional type to map, I have no control over the mapping. For example, I needed to generate the discriminator column in the IdentityUserMap and then provide discriminator value in the ApplicationUserMap.
Moreover, the schema that gets generated for the ApplicationUser table is not very good - no foreign keys or indexes. I suppose this is because I can't supply ClassMapping to the ConventionModelBuilder so it uses some basic conventions only to map property to columns.
Would you consider providing a way to pass not only additional types to map, but also additional mapping types themselves (e.g. classes deriving from ClassMapping)? This way I could extend your mappings and provide mine as well.
The text was updated successfully, but these errors were encountered: