Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Provide a way to add mapping for ApplicationUser #22

Open
ghost opened this issue Feb 8, 2015 · 0 comments
Open

Provide a way to add mapping for ApplicationUser #22

ghost opened this issue Feb 8, 2015 · 0 comments

Comments

@ghost
Copy link

ghost commented Feb 8, 2015

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

0 participants