HyperDev.Data.OData
1.2.1
dotnet add package HyperDev.Data.OData --version 1.2.1
NuGet\Install-Package HyperDev.Data.OData -Version 1.2.1
<PackageReference Include="HyperDev.Data.OData" Version="1.2.1" />
<PackageVersion Include="HyperDev.Data.OData" Version="1.2.1" />
<PackageReference Include="HyperDev.Data.OData" />
paket add HyperDev.Data.OData --version 1.2.1
#r "nuget: HyperDev.Data.OData, 1.2.1"
#:package HyperDev.Data.OData@1.2.1
#addin nuget:?package=HyperDev.Data.OData&version=1.2.1
#tool nuget:?package=HyperDev.Data.OData&version=1.2.1
HyperDev.Data.OData
Applies OData query strings ($filter, $orderby, $select, $expand, $top, $skip, $count) to Entity Framework Core queries, part of the HyperDev Fatum framework.
Built on Microsoft.AspNetCore.OData, without OData routing or controllers.
DbContext.Query<T>(queryString, out count): runs an OData query onDbSet<T>;Query<T, TResult>(query, queryString, out count)starts from an existingIQueryable<T>- EDM model built from the EF Core model (
GetEdmModel(),IModel.ToEdmModel()), cached per context type IQueryable<T>.ApplyTo(queryString, out count)for plain CLR types, without aDbContext- The ordering of the source query is kept when
$orderbyis missing; keyless entities are supported - Optional
Action<IServiceCollection>to registerODataQuerySettingsorODataValidationSettings
Installation
dotnet add package HyperDev.Data.OData
Quick start
ShopContext and Customer are defined as in HyperDev.Data; any EF Core DbContext works.
using HyperDev.Data;
using HyperDev.Data.OData;
using var ctx = factory.CreateContext<ShopContext>("Shop");
// e.g. Request.QueryString.Value in a controller: the string starts with '?'
IQueryable result = ctx.Query<Customer>("?$filter=City eq 'Rome'&$orderby=Name&$top=20&$count=true", out long? count);
count is set when the query string contains $count=true.
Requirements
The package references the ASP.NET Core shared framework (Microsoft.AspNetCore.App).
Target frameworks
.NET 8.0, .NET 10.0
License
MIT, © Ivan Senatore, Wemake Informatica srl. Third-party dependencies keep their own licenses (Microsoft.AspNetCore.OData, Entity Framework Core: MIT).
| 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 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. |
-
net10.0
- HyperDev.Data (>= 1.2.2)
- Microsoft.AspNetCore.OData (>= 9.5.0)
-
net8.0
- HyperDev.Data (>= 1.2.2)
- Microsoft.AspNetCore.OData (>= 9.5.0)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on HyperDev.Data.OData:
| Package | Downloads |
|---|---|
|
HyperDev.Web.Remoting
HyperDev Fatum Framework |
GitHub repositories
This package is not used by any popular GitHub repositories.