Microsoft.OData.Client 9.0.0-preview.2

Prefix Reserved
This is a prerelease version of Microsoft.OData.Client.
dotnet add package Microsoft.OData.Client --version 9.0.0-preview.2
                    
NuGet\Install-Package Microsoft.OData.Client -Version 9.0.0-preview.2
                    
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="Microsoft.OData.Client" Version="9.0.0-preview.2" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Microsoft.OData.Client" Version="9.0.0-preview.2" />
                    
Directory.Packages.props
<PackageReference Include="Microsoft.OData.Client" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Microsoft.OData.Client --version 9.0.0-preview.2
                    
#r "nuget: Microsoft.OData.Client, 9.0.0-preview.2"
                    
#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.
#:package Microsoft.OData.Client@9.0.0-preview.2
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Microsoft.OData.Client&version=9.0.0-preview.2&prerelease
                    
Install as a Cake Addin
#tool nuget:?package=Microsoft.OData.Client&version=9.0.0-preview.2&prerelease
                    
Install as a Cake Tool

Microsoft.OData.Client

The Microsoft.OData.Client library allows you to consume data from and interact with OData services from .NET applications. It provides LINQ-enabled client APIs for issuing OData queries and constructing and consuming OData JSON payloads. It supports OData v4 and v4.01.

Installation

You can install the Microsoft.OData.Client package via NuGet:

dotnet add package Microsoft.OData.Client

Or via the NuGet Package Manager Console:

Install-Package Microsoft.OData.Client

Getting Started

Creating an OData Client

To create an OData client, you can use the OData Connected Service in Visual Studio to generate strongly-typed client code for your OData service.

  1. Install the OData Connected Service extension:

  2. Add the OData Connected Service to your project:

    • Right-click your project in the Solution Explorer.
    • Select Add > Connected Service.
    • Choose OData Connected Service and follow the wizard to configure your service.

Example Usage

Here's a simple example of how to use the generated client to interact with an OData service:

using Microsoft.OData.SampleService.Models.TripPin;

var serviceUri = new Uri("https://services.odata.org/V4/TripPinServiceRW/");
var context = new DefaultContainer(serviceUri);

// Querying data
var people = await context.People.ExecuteAsync();
foreach (var person in people)
{
    Console.WriteLine($"{person.FirstName} {person.LastName}");
}

Documentation

For more detailed information, please refer to the official documentation

Community

Contribution

There are many ways for you to contribute to OData .NET. The easiest way is to participate in discussion of features and issues. You can also contribute by sending pull requests of features or bug fixes to us. Contribution to the documentations is also highly welcomed. Please refer to the CONTRIBUTING.md for more details.

Reporting Security Issues

Security issues and bugs should be reported privately, via email, to the Microsoft Security Response Center (MSRC) secure@microsoft.com. You should receive a response within 24 hours. If for some reason you do not, please follow up via email to ensure we received your original message. Further information, including the MSRC PGP key, can be found in the Security TechCenter.

5.3 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.

Product Compatible and additional computed target framework versions.
.NET net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (86)

Showing the top 5 NuGet packages that depend on Microsoft.OData.Client:

Package Downloads
Microsoft.OData.Extensions.Client.Abstractions

This package contains the abstract codes you need to create OData client.

Microsoft.OData.ProxyExtensions

.NET helper classes for developing OData service Client Libraries. Learn more about how to use this library @ https://github.com/Microsoft/Vipr/.

BizDoc.Core

Workflow framework engine

BumperLane.Public.Api.Client

Client framework for Virteom APIs.

Microsoft.Office365.OutlookServices

.NET Client Library for Office 365 Mail, Calendar and Contacts API. Learn more about how to use this library at: https://dev.outlook.com/RestGettingStarted/Tutorial/dotnet.

GitHub repositories (15)

Showing the top 15 popular GitHub repositories that depend on Microsoft.OData.Client:

Repository Stars
microsoft/fluentui-blazor
Microsoft Fluent UI Blazor components library. For use with ASP.NET Core Blazor applications
pnp/PnP
SharePoint / Office 365 Developer Patterns and Practices - Archived older solutions. Please see https://aka.ms/m365pnp for updated guidance
OfficeDev/Microsoft-Teams-Samples
Welcome to the Microsoft Teams samples repository. Here you will find task-focused samples in C#, JavaScript and TypeScript to help you get started with the Microsoft Teams App!
OfficeDev/TrainingContent
Training Content used for developer.microsoft.com/office
OData/WebApi
OData Web API: A server library built upon ODataLib and WebApi
OData/odata.net
ODataLib: Open Data Protocol - .NET Libraries and Frameworks
telerik/xaml-sdk
The XAML SDK is an easy-to-use infrastructure with 1000+ developer focused examples for most of the Telerik UI for WPF controls.
6bee/Remote.Linq
Simply LINQ your remote resources...
microsoft/Dynamics-AX-Integration
Dynamics AX Integration samples and demos.
OData/ODataSamples
Samples: For ODataLib, OData Web API, RESTier, etc.
zLulus/NotePractice
My_Note 笔记练习demo
znlgis/sod
PDF.NET 的追求:代码的精简,开发、维护的简单与极致的运行效率!
hougaard/Youtube-Video-Sources
All the source code from my Youtube videos
voronov-maxim/OdataToEntity
OData .net core
microsoft/Vipr
Client Library Generation Toolkit
Version Downloads Last Updated
9.0.0-preview.2 118 8/21/2025
9.0.0-preview.1 321 7/10/2025
8.3.0 29,216 7/10/2025
8.2.4 14,024 6/24/2025
8.2.3 332,217 12/11/2024
8.2.2 53,956 11/19/2024
8.2.1 11,886 11/13/2024
8.2.0 90,119 11/8/2024
8.1.0 63,674 10/17/2024
8.0.2 48,494 9/30/2024
8.0.1 198,686 8/19/2024
8.0.0 10,392 8/12/2024
8.0.0-rc.1 1,387 7/11/2024
8.0.0-preview.3 1,033 5/31/2024
8.0.0-preview.2 1,009 5/3/2024
8.0.0-preview.1 237 4/26/2024
7.22.0 4,369 7/10/2025
7.21.7 4,115 6/23/2025
7.21.6 118,477 11/8/2024
7.21.5 106,897 10/22/2024
7.21.4 53,079 9/30/2024
7.21.3 258,250 6/3/2024
7.21.2 31,076 5/23/2024
7.21.1 69,671 5/2/2024
7.21.0 111,598 4/17/2024
7.20.0 673,411 12/8/2023
7.19.0 30,651 11/30/2023
7.18.0 390,113 9/6/2023
7.17.0 244,833 6/23/2023
7.16.0 166,192 5/16/2023
7.15.0 274,914 3/1/2023
7.14.1 35,053 2/15/2023
7.14.0 169,105 1/11/2023
7.13.0 89,648 12/9/2022
7.12.5 235,495 10/25/2022
7.12.4 80,041 10/18/2022
7.12.3 207,184 9/19/2022
7.12.2 122,576 8/12/2022
7.12.1 145,660 7/20/2022
7.12.0 109,785 6/21/2022
7.11.1 12,436 6/16/2022
7.10.0 512,346 1/31/2022
7.9.4 609,841 11/5/2021
7.9.3 84,086 10/8/2021
7.9.2 119,340 9/14/2021
7.9.1 83,660 8/26/2021
7.9.0 470,049 5/12/2021
7.8.3 537,347 3/3/2021
7.8.2 80,460 2/15/2021
7.8.1 194,040 12/18/2020
7.7.3 213,102 11/12/2020
7.7.2 204,352 9/23/2020
7.7.1 126,470 9/1/2020
7.7.0 419,793 6/26/2020
7.7.0-beta 1,004 5/29/2020
7.6.4 290,513 3/25/2020
7.6.3 291,068 1/30/2020
7.6.2 122,416 11/21/2019
7.6.1 272,579 9/30/2019
7.6.1-beta 916 9/18/2019
7.6.0 258,783 6/5/2019
7.6.0-beta 1,921 4/1/2019
7.5.4 340,274 2/15/2019
7.5.3 140,934 12/19/2018
7.5.2 57,535 11/20/2018
7.5.1 315,825 9/17/2018
7.5.0 593,784 6/27/2018
7.4.4 160,727 4/4/2018
7.4.3 35,870 3/21/2018
7.4.1 72,507 2/16/2018
7.4.0 138,287 1/22/2018
7.4.0-beta3 4,884 1/12/2018
7.4.0-beta2 1,684 12/18/2017
7.4.0-beta 2,410 11/2/2017
6.19.0 424,639 11/14/2017
6.18.0 92,852 9/7/2017
6.18.0-beta 1,851 7/27/2017
6.17.0 365,464 6/12/2017
6.16.0 154,130 4/3/2017
6.16.0-beta 1,652 1/13/2017
6.15.0 1,522,534 3/18/2016
6.15.0-beta 1,993 1/25/2016
6.14.0 86,145 12/15/2015
6.14.0-rc2 1,703 12/2/2015
6.14.0-rc 2,759 10/30/2015
6.14.0-beta 1,409 10/16/2015
6.13.0 722,703 7/22/2015
6.13.0-rc 1,696 7/14/2015
6.13.0-beta 1,460 6/19/2015
6.12.0 214,204 5/22/2015
6.12.0-beta 1,908 5/15/2015
6.11.0 356,601 3/30/2015
6.10.0 62,215 2/6/2015
6.9.0 34,013 12/10/2014
6.8.1 295,560 10/20/2014
6.8.0 4,541 9/23/2014
6.7.0 6,384 8/29/2014
6.6.0 12,011 7/31/2014
6.5.0 13,448 6/30/2014
6.4.0 3,825 5/30/2014
6.3.0 6,102 4/28/2014
6.2.0 3,934 4/1/2014
6.1.0 2,965 3/4/2014
6.0.0 15,706 1/27/2014
6.0.0-beta1 2,054 12/9/2013
6.0.0-alpha2 1,807 11/7/2013
6.0.0-alpha1 1,977 10/4/2013