tags:

views:

95

answers:

3

From my personal research, it appears that OData implementations depend extensively on MS Entity framework. It would seem possible to implement the OData producer protocol using an open ORM like NHibernate in C# or Hibernate in Java.

In the best of all worlds, it would be cool to expose data using OData protocol from Oracle. I am open to other open solutions like Java, JRuby, etc.

Thanks in advance for your time.

+1  A: 

Actually Entity Framework is just one of the providers (although the easiest one to start with). You can definitely use NHibernate and I've seen lot of people do that. There are still some dark corners, but for the most part this works just fine. You can also write your own provider (which is lot of work though), for this see the OData Provider Toolkist at http://www.odata.org/developers/odata-sdk. Last week Oracle also announced that they will release an official Oracle provider for Entity Framework, so using that you can use the EF as the OData provider.

Vitek Karas MSFT
A: 

Entity Framework is just one solution for exposing OData. The advantage of this solution is that it's the easiest one.
The good news is that Entity Framework works with Oracle. As Vitek Karas wrote, Oracle will support Entity Framework by then end of the year. But you don't have to wait. Other providers exist. See the products from Devart and Data Direct, for example.

Fabrice
A: 

Try using the "Reflection Provider" which is geared towards POCO-based OData. It's easy to map this to any LINQ-enabled ORM - for that step I assume you could use DbLinq for your LINQ-to-Oracle layer.

This article gives an example:

http://blogs.msdn.com/b/alexj/archive/2010/06/11/tip-56-writing-an-odata-service-using-the-reflection-provider.aspx

In my own findings I didn't even use the attribute markup, though it seems helpful to do so.

As alluded to elsewhere you can also write a complete custom provider, but that seems like unnecessary work given the existence of the reflection provider. Hope it helps!

Malachi