Skip to content

ASP.NET Core OData: A server library built upon ODataLib and ASP.NET Core

Notifications You must be signed in to change notification settings

smitpatel/AspNetCoreOData

 
 

Repository files navigation

ASP.NET Core (.NET 5) OData

Component Build Status
ASP.NET Core OData Rolling Build status
ASP.NET Core OData Nightly Build status

1. Introduction

This is the official ASP.NET Core OData repository. ASP.NET Core OData is a server side library built upon ODataLib and ASP.NET Core.

Blogs:

  1. ASP.NET Core OData 8.0 Preview for .NET 5
  2. Routing in ASP.NET Core OData 8.0 Preview

Example:

2. Basic Usage

In the ASP.NET Core Web Application project, update your Startup.cs as below:

public class Startup
{
    public void ConfigureServices(IServiceCollection services)
    {
        services.AddDbContext<BookStoreContext>(opt => opt.UseInMemoryDatabase("BookLists"));
        services.AddControllers();
        services.AddOData(opt => opt.AddModel("odata", GetEdmModel()));
    }

    public void Configure(IApplicationBuilder app, IWebHostEnvironment env)
    {
        app.UseRouting();
        app.UseEndpoints(endpoints =>
        {
            endpoints.MapControllers();
        });
    }

    private static IEdmModel GetEdmModel()
    {
        // …
    }
}

That's it.

3. Building, Testing, Debugging and Release

3.1 Building and Testing in Visual Studio

Visual Studio 2019 Preview is necessary to build the project.

3.2 One-click build and test script in command line

Coming soon.

3.3 Debug

The symbol package is uploaded to nuget symbol server.

3.4 Nightly Builds

The nightly build process will upload a NuGet packages for ASP.NET Core OData to:

To connect to webapinightly feed, use this feed URL:

4. Documentation

5. Community

5.1 Contribution

Any contribution, feature request, bug, issue are welcome.

5.2 Support

Code of Conduct

This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact opencode@microsoft.com with any additional questions or comments.

About

ASP.NET Core OData: A server library built upon ODataLib and ASP.NET Core

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • C# 92.8%
  • 1C Enterprise 7.2%