I use Entity Framework as my ORM, and each of my classes implements an interface that basically represents table structures (one readonly property for each field). These interfaces are designed to be shared between assemblies for different applications. They do not support any write operations.
Now EF allows me to use instances of IQueryable <EntityClass>. I would like to have support for the IQueryable <IEntityInterface> that will be above it. Needless to say, I expect that I can perform Where operations using the interface properties.
Is this possible at all, or am I wasting my time here? I tried to implement my own IQueryProvider and ExpressionVisitor, but so far this has not turned out so well. I have very little experience with LINQ expression structures. Is it a way to go or is there another, better way?
source share