Category OData

Using an OData Client with an ASP.NET Core API

The article shows how to implement an OData client from an ASP.NET Core application. Bearer token authorization is used to secure the API. Code: https://github.com/damienbod/AspNetCoreOData This blog is part 2 from this blog: Part 1: OData with ASP.NET Core History 2020-11-22 Updated .NET 5 2020-07-06 Updated .NET Core 3.1, IdentityServer4 4.0.2 Setting up the applications […]

OData with ASP.NET Core

This article explores how to setup an OData API with ASP.NET Core. The application uses Entity Framework Core with a database first approach using the adventureworks 2016 Microsoft SQL Database. Code: https://github.com/damienbod/AspNetCoreOData Part 2: Using an OData Client with an ASP.NET Core API Using an OData Client with an ASP.NET Core API History 2020-11-22 Updated .NET […]

Web API OData V4 Keys, Composite Keys and Functions Part 11

This article demonstrates how OData Functions can be used together with entities which have simple keys, composite keys, entity collections or used as plain simple global functions. Part 1 Getting started with Web API and OData V4 Part 1. Part 2 Web API and OData V4 Queries, Functions and Attribute Routing Part 2 Part 3 […]

Web API OData V4 Batching Part 10

This article demonstrates how batching can be used with a Web API OData V4 service and an OData C# client. This blog is part 10 of the Web API OData series. Batching can be used to optimize network usage. Batching makes it possible to send many HTTP requests as a single multiple mixed request. The […]

Web API OData V4 Cache Part 9

This article shows how easy it is to implement cache with Web API OData. Web API OData V4 now supports Etag and also If-None-Match HTTP headers. These can then be accessed and set using the ODataQueryOptions inside an OData controller. This works well and could be a possible solution if you want to implement everything […]

Web API OData V4 Using an OData T4 generated client Part 8

This article demonstrates how to use an OData generated client. The OData client is generated using a T4 template. This T4 template generator is a NuGet package which can be added to your Visual Studio. The generated C# classes from the T4 template have some drawbacks per default, but you can fulfill your standard requirements […]

Web API OData V4 Using a Singleton Part 7

This post is part 7 of the Web API and OData V4 series. This article demonstrates how to use an OData singleton with Web API. The singleton class has a list of child entities which is used to select contained entities from the SQLite database. Part 1 Getting started with Web API and OData V4 […]

Web API OData V4 Using Contained Models Part 6

This post is part 6 of the Web API and OData V4 series. This article shows how Web API 2.2 with OData V4 can use contained EntityTypes in an OData model without defining the entities on the top level. In this example, the Player entity is the route entity set. The PlayerStats can then be […]

Web API OData V4 Using Unity IoC, SQLite with EF6 and OData Model Aliasing Part 5

This post is part 5 of the Web API and OData V4 series. This article shows how Web API 2.2 with OData V4 can be used together with Unity as an IoC, Entity Framework with SQLite for persistence and also creates an OData service which can do CRUD operations. OData Model Aliasing features are used […]

Web API OData V4 using enum with functions and Entities Part 4

This post is part 4 of the Web API and OData V4 series. This article shows how Web API 2.2 with OData V4 supports enum in entities or as return values and also supports enum parameters for functions. Part 1 Getting started with Web API and OData V4 Part 1. Part 2 Web API and […]