Looking for a sample or tutorial for the new OData bits

Gil Shalit 6 Reputation points
2025-01-01T10:00:20.58+00:00

I want to write an Odata 4 compliant C# isolated mode serverless function endpoint. I am confused by the recent announcements here about ASP.NET Core OData 9 and OData .NET 8 - which should use?

Are there any tutorials or samples for this? All I can find are materials abour earlier versions.

Developer technologies | ASP.NET | ASP.NET Core
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Anonymous
    2025-01-02T02:19:34.88+00:00

    Hi @Gil Shalit,

    If your project target framework is under .NET 8, you could only use Odata 8 in ASP.NET Core.

    Tutorials you could refer to: ASP.NET Core OData 8.

    If your project target framework is .NET 8 or later, you could consider using Odata 9.

    For Odata 9 you could refer to ASP.NET Core Odata 9 .


    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    Best regards,
    Rena


  2. Bruce (SqlWork.com) 78,086 Reputation points Volunteer Moderator
    2025-02-03T16:18:11.11+00:00

    odata 8/9 is more about compatibility with changes in the .net runtime rather than new features. you should do fine with the current documentation. the release give breaking changes:

    https://learn.microsoft.com/en-us/odata/changelog/odatalib-8x

    odata 8 has the latest features and supports earlier version of .net core (back to 3.1). Odata 9 has been updated to require all dependencies to be at least version 8 runtime, so .net 8 runtime is lowest supported.

    for new code, as runtimes before .net 8 are out if support, you should pick .net 8 or .net 9 runtime for your functions. Therefore pick odata 9.

    note: .net 8 is the LTS version supported to 11/10/2026. .net 9 is a standard (1 year support) is supported to 5/16/2026.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.