Microsoft.OData.Client
8.2.4
Prefix Reserved
dotnet add package Microsoft.OData.Client --version 8.2.4
NuGet\Install-Package Microsoft.OData.Client -Version 8.2.4
<PackageReference Include="Microsoft.OData.Client" Version="8.2.4" />
<PackageVersion Include="Microsoft.OData.Client" Version="8.2.4" />
<PackageReference Include="Microsoft.OData.Client" />
paket add Microsoft.OData.Client --version 8.2.4
#r "nuget: Microsoft.OData.Client, 8.2.4"
#addin nuget:?package=Microsoft.OData.Client&version=8.2.4
#tool nuget:?package=Microsoft.OData.Client&version=8.2.4
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.
Install the OData Connected Service extension:
- Go to the
Extensions
menu inVisual Studio
. - Select
Manage Extensions
. - Search for
OData Connected Service
and install it. - Alternatively, you can get the extension at Visual Studio Marketplace: OData Connected Service and OData Connected Service 2022+
- Go to the
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
- Issues: Report issues on Github issues.
- Questions: Ask questions on Stack Overflow.
- Feedback: Please send mails to odatafeedback@microsoft.com.
- Team blog: Please visit https://devblogs.microsoft.com/odata/ and http://www.odata.org/blog/.
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 | Versions 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. |
-
- Microsoft.Extensions.Http (>= 8.0.0)
- Microsoft.OData.Core (= 8.2.4)
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...
|
|
OData/ODataSamples
Samples: For ODataLib, OData Web API, RESTier, etc.
|
|
microsoft/Dynamics-AX-Integration
Dynamics AX Integration samples and demos.
|
|
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 |
---|---|---|
8.2.4 | 1,411 | 6/24/2025 |
8.2.3 | 267,427 | 12/11/2024 |
8.2.2 | 47,017 | 11/19/2024 |
8.2.1 | 10,533 | 11/13/2024 |
8.2.0 | 71,084 | 11/8/2024 |
8.1.0 | 58,492 | 10/17/2024 |
8.0.2 | 45,973 | 9/30/2024 |
8.0.1 | 178,702 | 8/19/2024 |
8.0.0 | 9,330 | 8/12/2024 |
8.0.0-rc.1 | 1,353 | 7/11/2024 |
8.0.0-preview.3 | 997 | 5/31/2024 |
8.0.0-preview.2 | 976 | 5/3/2024 |
8.0.0-preview.1 | 210 | 4/26/2024 |
7.21.7 | 261 | 6/23/2025 |
7.21.6 | 83,021 | 11/8/2024 |
7.21.5 | 95,691 | 10/22/2024 |
7.21.4 | 46,305 | 9/30/2024 |
7.21.3 | 243,206 | 6/3/2024 |
7.21.2 | 28,849 | 5/23/2024 |
7.21.1 | 66,642 | 5/2/2024 |
7.21.0 | 101,087 | 4/17/2024 |
7.20.0 | 634,998 | 12/8/2023 |
7.19.0 | 29,602 | 11/30/2023 |
7.18.0 | 383,032 | 9/6/2023 |
7.17.0 | 237,880 | 6/23/2023 |
7.16.0 | 163,240 | 5/16/2023 |
7.15.0 | 267,929 | 3/1/2023 |
7.14.1 | 34,163 | 2/15/2023 |
7.14.0 | 165,462 | 1/11/2023 |
7.13.0 | 87,461 | 12/9/2022 |
7.12.5 | 230,671 | 10/25/2022 |
7.12.4 | 79,263 | 10/18/2022 |
7.12.3 | 204,486 | 9/19/2022 |
7.12.2 | 118,161 | 8/12/2022 |
7.12.1 | 138,330 | 7/20/2022 |
7.12.0 | 107,577 | 6/21/2022 |
7.11.1 | 11,844 | 6/16/2022 |
7.10.0 | 495,752 | 1/31/2022 |
7.9.4 | 601,838 | 11/5/2021 |
7.9.3 | 83,150 | 10/8/2021 |
7.9.2 | 113,527 | 9/14/2021 |
7.9.1 | 79,772 | 8/26/2021 |
7.9.0 | 462,420 | 5/12/2021 |
7.8.3 | 518,453 | 3/3/2021 |
7.8.2 | 78,588 | 2/15/2021 |
7.8.1 | 191,079 | 12/18/2020 |
7.7.3 | 207,288 | 11/12/2020 |
7.7.2 | 197,096 | 9/23/2020 |
7.7.1 | 122,527 | 9/1/2020 |
7.7.0 | 390,793 | 6/26/2020 |
7.7.0-beta | 964 | 5/29/2020 |
7.6.4 | 286,490 | 3/25/2020 |
7.6.3 | 287,670 | 1/30/2020 |
7.6.2 | 120,920 | 11/21/2019 |
7.6.1 | 270,203 | 9/30/2019 |
7.6.1-beta | 875 | 9/18/2019 |
7.6.0 | 257,351 | 6/5/2019 |
7.6.0-beta | 1,875 | 4/1/2019 |
7.5.4 | 334,445 | 2/15/2019 |
7.5.3 | 140,101 | 12/19/2018 |
7.5.2 | 55,303 | 11/20/2018 |
7.5.1 | 313,231 | 9/17/2018 |
7.5.0 | 588,936 | 6/27/2018 |
7.4.4 | 159,609 | 4/4/2018 |
7.4.3 | 35,245 | 3/21/2018 |
7.4.1 | 70,937 | 2/16/2018 |
7.4.0 | 137,515 | 1/22/2018 |
7.4.0-beta3 | 4,783 | 1/12/2018 |
7.4.0-beta2 | 1,586 | 12/18/2017 |
7.4.0-beta | 2,338 | 11/2/2017 |
6.19.0 | 420,168 | 11/14/2017 |
6.18.0 | 92,193 | 9/7/2017 |
6.18.0-beta | 1,774 | 7/27/2017 |
6.17.0 | 364,630 | 6/12/2017 |
6.16.0 | 153,317 | 4/3/2017 |
6.16.0-beta | 1,576 | 1/13/2017 |
6.15.0 | 1,506,945 | 3/18/2016 |
6.15.0-beta | 1,919 | 1/25/2016 |
6.14.0 | 85,209 | 12/15/2015 |
6.14.0-rc2 | 1,626 | 12/2/2015 |
6.14.0-rc | 2,687 | 10/30/2015 |
6.14.0-beta | 1,339 | 10/16/2015 |
6.13.0 | 712,711 | 7/22/2015 |
6.13.0-rc | 1,598 | 7/14/2015 |
6.13.0-beta | 1,390 | 6/19/2015 |
6.12.0 | 211,916 | 5/22/2015 |
6.12.0-beta | 1,813 | 5/15/2015 |
6.11.0 | 348,049 | 3/30/2015 |
6.10.0 | 61,473 | 2/6/2015 |
6.9.0 | 33,387 | 12/10/2014 |
6.8.1 | 293,163 | 10/20/2014 |
6.8.0 | 3,917 | 9/23/2014 |
6.7.0 | 5,726 | 8/29/2014 |
6.6.0 | 11,389 | 7/31/2014 |
6.5.0 | 12,589 | 6/30/2014 |
6.4.0 | 3,199 | 5/30/2014 |
6.3.0 | 5,477 | 4/28/2014 |
6.2.0 | 3,307 | 4/1/2014 |
6.1.0 | 2,336 | 3/4/2014 |
6.0.0 | 13,888 | 1/27/2014 |
6.0.0-beta1 | 1,952 | 12/9/2013 |
6.0.0-alpha2 | 1,730 | 11/7/2013 |
6.0.0-alpha1 | 1,898 | 10/4/2013 |