OData.Client.Manager 2.3.0

dotnet add package OData.Client.Manager --version 2.3.0
NuGet\Install-Package OData.Client.Manager -Version 2.3.0
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="OData.Client.Manager" Version="2.3.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add OData.Client.Manager --version 2.3.0
#r "nuget: OData.Client.Manager, 2.3.0"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install OData.Client.Manager as a Cake Addin
#addin nuget:?package=OData.Client.Manager&version=2.3.0

// Install OData.Client.Manager as a Cake Tool
#tool nuget:?package=OData.Client.Manager&version=2.3.0

ODataClientManager

NuGet .NET Core Quality Gate Status Coverage

Purpose

This repository provides a C# based OData client manager library. The Manager uses the IODataClient implementation of Simple.OData.Client to communicate with OData APIs and is able to handle authorization and versioning requirements.

Getting started

The easiest way to start using the ODataManager is to install the Nuget package:

Install-Package OData.Client.Manager

In the source file where you will be using ODataManager import the namespace:

using OData.Client.Manager;

Quickstart

The following code snipped shows an example of how to use the IODataManger implementation.

// Create the manager
var odataEndpoint = new Uri("http://localhost:12345/api");
var manager = new ODataManager(odataEndpoint);

// Use the client of the manager (example of the typed fluent API syntax)
IEnumerable<Product> entities = await manager.Client
    .For<Product>()
    .FindEntriesAsync();

// Use the client of the manager (example of the dynamic fluent API syntax)
var dx = ODataDynamic.Expression;
IEnumerable<dynamic> entities = await manager.Client
    .For(dx.Products)
    .FindEntriesAsync();

For more information about how to use the Odata client, please read the Simple.OData.Client documentation.

Make use of autenticated and versioned requests

  • To make use of authentication use one of the existing authenticators in the OData.Client.Manager.Authenticators namespace, or create your own by implementing the IAuthenticator interface.
  • To make use of authentication, just use one of the existing managers in the OData.Client.Manager.Versioning namespace or create your own by implementing the IVersioningManager interface.
// Setup the configuration
var config = new ODataManagerConfiguration(new Uri("http://localhost:12345/api"))
{
    // Authenticated requests
    Authenticator = new OidcAuthenticator(new OidcSettings
    {
        AuthUri = new Uri("http://localhost:5000"),
        ClientId = "ClientAppX",
        ClientSecret = "Secret",
        Username = "User",
        Password = "Password",
        Scope = "api1",

        GrantType = "Password", // Default
        DiscoveryPolicy = new DiscoveryPolicy { RequireHttps = false },
    }),

    // Versioned requests
    VersioningManager = new QueryParamVersioningManager("1.2", "api-version")
};

// Use the configuration in the ctor of the manager
var manager = new ODataManager(config);

FAQ

  1. Why do I get the error Https required?
    • OIDC endpoints must provide an encrypted connection (https) by default (except URIs of localhost). To disable this requirement, make use of the OidcSettings and set RequireHttps of the DiscoveryPolicy property to false: settings.DiscoveryPolicy = new DiscoveryPolicy { RequireHttps = requireHttps };.

Open Source License Acknowledgements and Third-Party Copyrights

Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 is compatible.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 is compatible.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
.NET Core netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.0 is compatible.  netstandard2.1 is compatible. 
.NET Framework net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen40 was computed.  tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
2.3.0 290 1/30/2023
2.2.0 320 11/20/2022
2.1.0 642 10/6/2020
2.0.5 512 4/15/2020
2.0.4 466 3/13/2020
2.0.3 426 3/11/2020
2.0.2 572 1/7/2020
2.0.1 495 11/24/2019
2.0.0 464 10/23/2019