Building a web service that supports OData
There is no dotnet new project template for ASP.NET Core OData, but it uses controller classes, so we will use the ASP.NET Core Web API using controllers project template and then add package references to add the OData capabilities:
- Use your preferred code editor to add a new project, as defined in the following list:
- Project template: ASP.NET Core Web API /
webapi --use-controllers - Solution file and folder:
MatureWeb - Project file and folder:
Northwind.OData
- Project template: ASP.NET Core Web API /
- If you are using Visual Studio, then confirm that the following defaults have been chosen:
- Framework: .NET 10.0 (Long Term Support)
- Authentication type: None
- Configure for HTTPS: Selected
- Enable container support: Cleared
- Enable OpenAPI support: Selected
- Do not use top-level statements: Cleared
- Use controllers: Selected
- Enlist in Aspire orchestration...