I need something like this:
context.EntitiesDbSet.Keys.Where(predicate);
And predicate here is of type Expression<Func<Entity,bool>>
The only solution I know for now is to use projections generated via metada analysis.
Are there any simpler methods?
One way I know is through reflection, using KeyAttribute on Entities and search on Entity the property with KeyAttribute. Example:
I believe that would help.