tags:

views:

26

answers:

1

I have some kind of "data engine" between multiple "data consumer" processes and multiple "data storage" sources. I'd like to provide Linq capabilities to the "data consumer" and forward the query to the "data storage". The forwarded query should be some structured query (like, let's say, NHibernate Criteria).

Is there any existing structured query library that could allow me to "just" translate a Linq Expression to such a structured query?

A: 

When you want to translate a LINQ query to NHibernate Criteria, I think this is what the LINQ library for NHibernate does, so you try using that or looking at the source.

There are LINQ provider toolkits that help you write your own LINQ provider. You could look at IQToolkit.

Steven
Regarding NHibernate.Linq, the NHibernateQueryProvider requires a NHibernate Session on intanciation. That makes it hard to use "stand alone". I could try extracting the translation logic, but don't know if it's feasible. I guess there's somewhere a library offering some kind of Criteria structure with no data access layer.
fredlegrain