Skip to content

Real world examples for OData in ASP.NET Core applications #2

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
lurumad opened this issue Sep 8, 2020 · 3 comments
Closed

Real world examples for OData in ASP.NET Core applications #2

lurumad opened this issue Sep 8, 2020 · 3 comments
Labels
question Further information is requested

Comments

@lurumad
Copy link

lurumad commented Sep 8, 2020

Hi,

I'm very interesting in OData, I think it's super powerfull and I want to use in my ASP.NET Core APIs and also Microsoft uses in many products and I'm looking for real world examples more than "Hello worlds", for example, How Microsoft builts his APIs, some guidances to be implement it correctly.

I prefer to use OData instead GraphQL, but I think is easier to find more docs and samples about GraphQL than OData.

Kind regards!

@xuzhg
Copy link
Member

xuzhg commented Sep 24, 2020

@lurumad Sorry, I just saw your input. I appreciate your interesting of OData.

Actually, it's easy to find many docs, tutorials, blogs about OData.

for example:

  1. you can find docs at https://docs.microsoft.com/en-us/odata/

  2. you can find the OData spec at: http://www.odata.org

  3. you can find blogs at: https://devblogs.microsoft.com/odata/

  4. you can find some prototype examples at
    a) https://github.com/OData/AspNetCoreOData/tree/master/sample/ODataRoutingSample
    b) https://github.com/OData/WebApi/tree/master/samples
    c) https://github.com/OData/ODataSamples/tree/master/RESTier/Trippin
    ....

  5. For the real world, there are a lot of Microsoft services using OData. For example, dynamics, devops, onedrive, etc.
    Especially, the Microsoft Graph. From https://docs.microsoft.com/en-us/graph/overview, you can find more detail about the microsoft graph.
    Even, you can use this link to try the Microsoft Graph. https://developer.microsoft.com/en-us/graph/graph-explorer

  6. More over, for the whole ecosystem and more external real world example of OData, you can find it more at: https://www.odata.org/ecosystem/

Hope it can help you.

@xuzhg xuzhg added the question Further information is requested label Sep 24, 2020
@tomasfabian
Copy link

tomasfabian commented Oct 19, 2020

Hi @lurumad @xuzhg,
I created an OData plumbing/boilerplate code nuget package for the community. It will hopefully help you start up your project very quickly with few lines of code. It contains the following features and integrations:

  • Enabled ODataBatchHandler. Support for SaveChangesOptions.BatchWithSingleChangeset with SQL Server database transaction. This means end to end transaction scope from your .NET clients.
  • Built in Autofac IoC container for dependency injection
  • Built in serialization with NewtonsoftJson
  • ODataStartup Kestrel self hosting and IIS integration
  • ODataController GET, POST, PUT, DELETE, CreateRef and DeleteRef implementation
  • ErrorLoggerMiddleware
  • Serilog
  • Both EntityFrameworkCore and EntityFramework are supported
  • Health check support

You can find it here:
https://github.com/tomasfabian/Joker
Install-Package Joker.OData -Version 1.6.0

Of course you can override the defaults:
https://github.com/tomasfabian/Joker/wiki/Joker.OData

Sample:
https://github.com/tomasfabian/Joker/tree/master/Samples/OData/SelfHostedODataService

Visual studio project template:
https://marketplace.visualstudio.com/items?itemName=tomasfabian.SelfHostedODataService-Joker-EF

I also created an OData v8preview branch. There are some breaking changes from v7 I have to adjust in the next few days.

Let me know in my repository if you need any improvements or you have constructive suggestions.

Thanks, Tomas.

@xuzhg
Copy link
Member

xuzhg commented Jan 12, 2022

I'd close this issue. Please file new issue if you have more concerns or questions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants