tags:

views:

338

answers:

1

I am using NHibernate with NHibernate.Linq, and have a bunch of dynamically loading modules each with their own POCO's and Mappings (ClassMap<POCO>).

I have created OData services before, but normally with a datacontext and IQueryable as Properties/Getters.

What I want is to create the service by passing in IEnumerable, into the constructor

IEnumerable<IQueryable>> queryableObjects;
var dataService = new DataService(queryableObjects);

Is this at all possible?

+1  A: 

It is doable, but it requires some more work. The way to do this is to implement your customer provider. A very nice guide how to do this is here: http://blogs.msdn.com/b/alexj/archive/2010/01/07/data-service-providers-getting-started.aspx

There are also nice samples as part of the OData provider toolkit, which can be found on http://www.odata.org/developers/odata-sdk.

Vitek Karas MSFT
Looks interesting, thanksWould be a great edition to umbraco
Elijah Glover
Got it working, it is possible
Elijah Glover