locked
Odata and Non-EF database working sample RRS feed

  • Question

  • I have been researching if we can use WCF and C# to create an OData service that exposes data that is contained in a NexusDB database. I cannot change the NexusDB database as it is used by an outsourced application.

    So far I have found many sites showing how easy it is to create a OData service from a database with an Entity Framework driver and also a number of sites that show how to create a OData service from classes that exist only in memory. Although there are lots of sites they seem to be largely repeating the same information.

    Does anyone know where I can find a simple, complete working example of an OData service that is exposing data from an ODBC connected database ?

    Any help would be very greatly appreciated.

    Rob

    Thursday, August 15, 2013 5:57 AM

Answers

  • Hello Rob300,

    Welcome to MSDN Forums. 

    It is possible to use the Entity Framework with other 3<sup>rd</sup> party ADO.NET providers. I recommend you to take a look at the Microsoft reference below:

    3<sup>rd</sup> party ADO.NET providers

    You should add a new Entity Data Model into your project, go to the “Connection Properties” window and click “Change” to select a different data source.

    In addition, here is a link below will give code samples showcasing the usage of OData in ADO.NET Data Service.

    Advanced using OData in .NET: WCF Data Services

    I hope this information will be useful.

    Best Regards,

    Friday, August 16, 2013 2:03 AM
    Moderator