-
-
Notifications
You must be signed in to change notification settings - Fork 3
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
GetQuery returns BaseClass for EntityRepositoryBase<ConcreteClass, int> #20
Comments
Hi Galin, Thanks for reporting. There are a few things happening in
Are you 100% sure that TEntity is the final class and that you defined it correctly on the DbContext? |
Ok, let's put this on hold so you can figure it out first. If you think you found a bug, please report back (re-open this ticket) with a repro and we will look into it. |
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Greetings,
I have an EF 6 model created using DB first approach. I have further split some tables into abstract + concrete classes using Conditional Mappings (binary discriminators mostly).
I have created my repositories using the concrete classes however GetQuery always returns the base DbSet instead.
I have already added the DbSet< ConcreteClass > to my dbContext (hopefully for documentation purposes only) and it is working as expected.
Now, an easy fix for me would be to have a ConcreteEntityRepositoryBase of sorts that overrides the GetQuery method, returning base.GetQuery().OfType< TEntity >() but wanted to make sure exactly what the intended behavior is for this type of scenario..
Best regards,
Galin LIPCHEV
The text was updated successfully, but these errors were encountered: