Microsoft.OData.Client 8.4.2

Prefix Reserved
There is a newer prerelease version of this package available.
See the version list below for details.
dotnet add package Microsoft.OData.Client --version 8.4.2
                    
NuGet\Install-Package Microsoft.OData.Client -Version 8.4.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="8.4.2" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Microsoft.OData.Client" Version="8.4.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 8.4.2
                    
#r "nuget: Microsoft.OData.Client, 8.4.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@8.4.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=8.4.2
                    
Install as a Cake Addin
#tool nuget:?package=Microsoft.OData.Client&version=8.4.2
                    
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 net8.0 is compatible.  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.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  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 (16)

Showing the top 16 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
hougaard/Youtube-Video-Sources
All the source code from my Youtube videos
znlgis/sod
PDF.NET 的追求:代码的精简,开发、维护的简单与极致的运行效率!
voronov-maxim/OdataToEntity
OData .net core
telerik/kendo-ui-demos-service
Back-end service used for the Kendo UI Online Demos
microsoft/Vipr
Client Library Generation Toolkit
Version Downloads Last Updated
9.0.0-preview.2 577 8/21/2025
9.0.0-preview.1 409 7/10/2025
8.4.2 64 10/23/2025
8.4.0 38,247 9/10/2025
8.3.0 92,468 7/10/2025
8.2.4 22,063 6/24/2025
8.2.3 431,430 12/11/2024
8.2.2 66,765 11/19/2024
8.2.1 15,759 11/13/2024
8.2.0 134,233 11/8/2024
8.1.0 71,806 10/17/2024
8.0.2 54,393 9/30/2024
8.0.1 250,183 8/19/2024
8.0.0 13,798 8/12/2024
8.0.0-rc.1 1,455 7/11/2024
8.0.0-preview.3 1,116 5/31/2024
8.0.0-preview.2 1,096 5/3/2024
8.0.0-preview.1 259 4/26/2024
7.22.0 26,409 7/10/2025
7.21.7 11,512 6/23/2025
7.21.6 178,679 11/8/2024
7.21.5 128,502 10/22/2024
7.21.4 62,516 9/30/2024
7.21.3 287,235 6/3/2024
7.21.2 36,890 5/23/2024
7.21.1 76,327 5/2/2024
7.21.0 133,363 4/17/2024
7.20.0 737,216 12/8/2023
7.19.0 34,467 11/30/2023
7.18.0 403,570 9/6/2023
7.17.0 261,453 6/23/2023
7.16.0 176,086 5/16/2023
7.15.0 288,247 3/1/2023
7.14.1 38,612 2/15/2023
7.14.0 175,852 1/11/2023
7.13.0 94,809 12/9/2022
7.12.5 246,018 10/25/2022
7.12.4 82,988 10/18/2022
7.12.3 213,268 9/19/2022
7.12.2 132,958 8/12/2022
7.12.1 176,522 7/20/2022
7.12.0 114,808 6/21/2022
7.11.1 16,113 6/16/2022
7.10.0 535,619 1/31/2022
7.9.4 628,437 11/5/2021
7.9.3 87,351 10/8/2021
7.9.2 131,789 9/14/2021
7.9.1 88,846 8/26/2021
7.9.0 484,722 5/12/2021
7.8.3 576,840 3/3/2021
7.8.2 84,965 2/15/2021
7.8.1 201,247 12/18/2020
7.7.3 222,358 11/12/2020
7.7.2 213,693 9/23/2020
7.7.1 133,212 9/1/2020
7.7.0 477,844 6/26/2020
7.7.0-beta 1,070 5/29/2020
7.6.4 299,185 3/25/2020
7.6.3 297,729 1/30/2020
7.6.2 125,907 11/21/2019
7.6.1 279,841 9/30/2019
7.6.1-beta 977 9/18/2019
7.6.0 264,233 6/5/2019
7.6.0-beta 1,978 4/1/2019
7.5.4 357,277 2/15/2019
7.5.3 144,042 12/19/2018
7.5.2 62,167 11/20/2018
7.5.1 321,226 9/17/2018
7.5.0 601,413 6/27/2018
7.4.4 165,999 4/4/2018
7.4.3 39,079 3/21/2018
7.4.1 75,724 2/16/2018
7.4.0 146,918 1/22/2018
7.4.0-beta3 5,310 1/12/2018
7.4.0-beta2 1,783 12/18/2017
7.4.0-beta 2,503 11/2/2017
6.19.0 432,805 11/14/2017
6.18.0 95,844 9/7/2017
6.18.0-beta 1,928 7/27/2017
6.17.0 379,995 6/12/2017
6.16.0 157,353 4/3/2017
6.16.0-beta 1,730 1/13/2017
6.15.0 1,555,738 3/18/2016
6.15.0-beta 2,087 1/25/2016
6.14.0 89,322 12/15/2015
6.14.0-rc2 1,785 12/2/2015
6.14.0-rc 2,882 10/30/2015
6.14.0-beta 1,494 10/16/2015
6.13.0 740,393 7/22/2015
6.13.0-rc 1,796 7/14/2015
6.13.0-beta 1,545 6/19/2015
6.12.0 218,006 5/22/2015
6.12.0-beta 2,010 5/15/2015
6.11.0 369,445 3/30/2015
6.10.0 65,126 2/6/2015
6.9.0 36,835 12/10/2014
6.8.1 301,560 10/20/2014
6.8.0 7,301 9/23/2014
6.7.0 9,193 8/29/2014
6.6.0 14,775 7/31/2014
6.5.0 16,509 6/30/2014
6.4.0 6,586 5/30/2014
6.3.0 8,860 4/28/2014
6.2.0 6,696 4/1/2014
6.1.0 5,731 3/4/2014
6.0.0 20,690 1/27/2014
6.0.0-beta1 2,159 12/9/2013
6.0.0-alpha2 1,890 11/7/2013
6.0.0-alpha1 2,066 10/4/2013