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
About a year ago, I ran into this same issue and I created overloads for most read/query methods to include the base type .. this was a "quick fix", I'd probably try to do it using reflection if I had to do it again.
the main one that must be overloaded and modified is GetQuery.. something like this..
IQueryable GetQuery<TBaseEntity, TEntity>() {
return DbContext.Set().OfType();
}
Hi. Thanks for sharing this.
I have a one problem. I'm using Table per Hierarchy (TPH).
For example we have a base class:
And base class for several entitites:
My context:
Next, create context and repository:
But I get exception: the sequence does not have elements. In this code:
The text was updated successfully, but these errors were encountered: