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.Answer1:
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 <a href="http://www.odata.org/developers/odata-sdk" rel="nofollow">http://www.odata.org/developers/odata-sdk</a>. 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.Answer2:
There's a tutorial here: <a href="http://download.oracle.com/oll/obe/EntityFrameworkWCF/WCFEntityFramework.htm" rel="nofollow">WCF Data Services and OData for Oracle Database.</a>
Step 5 on pre-requisites has a link to download the files.Answer3:
Entity Framework is just one solution for exposing OData. The advantage of this solution is that it's the easiest one.<br /> 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.Answer4:
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:
<a href="http://blogs.msdn.com/b/alexj/archive/2010/06/11/tip-56-writing-an-odata-service-using-the-reflection-provider.aspx" rel="nofollow">http://blogs.msdn.com/b/alexj/archive/2010/06/11/tip-56-writing-an-odata-service-using-the-reflection-provider.aspx</a>
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!