0

We have a WCF Odata Service enabled. We are planning to migrate to Web API2. I was told we are not going to user Odata.

Could someone enlighten me on, why shouldn't we use Odata. Is it going to obsolete soon. What are the downsides of using it, and can we use it without Entity Framework. Please suggest a good tutorial. Thanks.

1 Answers1

0

This article https://learn.microsoft.com/en-us/aspnet/web-api/overview/odata-support-in-aspnet-web-api/odata-v4/create-an-odata-v4-endpoint was written less than a month ago, so I can't see any reason why you couldn't use Odata in Web API2. Shouldn't is just an opinion and not really what this site is for. I'd recommend asking whoever made the decision for their reasons.

As for a good tutorial, the article I just linked seems like a fairly good place to start.

From the article:

Web API OData does not require EF. Use any data-access layer that can translate database entities into models.

Ben
  • 1,316
  • 1
  • 7
  • 11
  • Yeah.. I discussed with team. What I understood is we can have Web API 2 with odata. What It' ll turn out too be just re-writing of existing wcf service - odata into Web APi2 except a few changes. WCF Data Service is using odata 3 and it's framework version is not being upgraded by microsoft. Can I used Odata v4 with WCF Data service ? [.Net framework 4.7.2] – Surendra Rayapati Feb 20 '19 at 07:45
  • I've gone through few links but didn't get clear view. What are the advantages of rewriting entier WCF Service in WebAPI 2 for the sake of odata upgradation to v4 from v3. what would I really loose if I continue using my working WCF Data service -odata-v3 – Surendra Rayapati Feb 20 '19 at 08:02
  • WCF comes with a lot of overhead and ceremony. You likely wouldn't rewrite for the sake of upgrading from v3 to v4 of oData, you'd likely rewrite to move away from WCF and replace with the simplicity of WebAPI. – Ben Feb 20 '19 at 22:48