I'd like to get a IQueryable<User>
being POCO. I have two functions in my repository which converts O/RM to POCO and vice versa. This works fine when saving or getting one user, but what about getting an IQueryable of User?
public IQueryable<Domains.User> GetUsers()
{
// This wont work because it can't convert to a store expression
return context.JUsers.Select(u => ConvertUserORMToDomain(u));
}
Do I have to manually rewrite out my conversion on each POCO domain in every IQueryable Method I have? I'd be better off without patterns if thats the case.
Converter: private Domains.User ConvertUserORMToDomain(ORM.JUser ormUser)