Hi folks. I could not find the answer amongst the many posts on Linq, so here I am. We have a client-server application, where the client side has absolutely no knowledge of the actual DAL on the server side, which is incidentally implemented using NHibernate. Meaning, there is no references to NHibernate from the client side assemblies, as well as no database abstraction. Client side speaks strictly in the terms of entities, which are based on CSLA business objects.
I would like to let the client side filter the displayed entities. My idea is to let the client side construct a Linq expression, transmit it to the server side, fetch the data matching the expression using Linq to NHibernate and return it back to the client.
I have downloaded and compiled Linq to NHibernate, but unfortunately I cannot find an example which decouples Linq expressions (aka client side) from the respective NHibernateContext instance (aka server side). All the examples seem to be like
from c in db.Customers where ...
i.e. both the context (db.Customers) and the expression (where ...) in one statement.
Is it possible to decouple them? Thanks.