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
  • " it appears that OData implementations depend extensively on MS Entity framework". Given OData's provenance, that's hardly surprising.
    – APC
    Jun 17, 2010 at 21:31

4 Answers 4

2

There's a tutorial here: WCF Data Services and OData for Oracle Database.

Step 5 on pre-requisites has a link to download the files.

1

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.

0

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.

0

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:

Link

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!

1
  • ODataConventionModelBuilder is something else that can be a great help. Probably the greatest helpers are the samples and the source code - under github.com/OData look for odata.net, WebApi, RESTier and ODataSamples. The OData technical committee page oasis-open.org/committees/tc_home.php?wg_abbrev=odata is also very helpful. And ApplyQuery can do some of the work for you - and ignoreQueryOptions can prevent it from redoing things you've already done. Finally, OData is a large beast - if you roll your own, it's likely to be a small (or medium) subset.
    – unbob
    Jun 2, 2020 at 18:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.