Gridify.EntityFramework
2.3.3
See the version list below for details.
dotnet add package Gridify.EntityFramework --version 2.3.3
NuGet\Install-Package Gridify.EntityFramework -Version 2.3.3
<PackageReference Include="Gridify.EntityFramework" Version="2.3.3" />
paket add Gridify.EntityFramework --version 2.3.3
#r "nuget: Gridify.EntityFramework, 2.3.3"
// Install Gridify.EntityFramework as a Cake Addin #addin nuget:?package=Gridify.EntityFramework&version=2.3.3 // Install Gridify.EntityFramework as a Cake Tool #tool nuget:?package=Gridify.EntityFramework&version=2.3.3
Gridify (A Modern Dynamic LINQ library)
Easy and optimized way to apply Filtering, Sorting and pagination using text-based data.
Gridify is a dynamic LINQ library that converts your strings to a LINQ query in the easiest way possible with excelent performance.
The best use case of this library is Asp-net APIs. When you need to get some string base filtering conditions to filter data or sort it by a field name or apply pagination concepts to your lists and return a pageable, data grid ready information, from any repository or database. Although, we are not limited to Asp.net projects and we can use this library on any .Net projects and on any collections.
Performance comparison
Filtering is the most expensive feature in gridify. the following benchmark is comparing filtering in the most known dynamic linq libraries. As you can see, gridify has the closest result to the native linq. Also, i Should note other features like Pagination and Sorting have almost zero overhead in Gridify.
BenchmarkDotNet=v0.13.0, OS=Windows 10.0.19043.1165 (21H1/May2021Update) 11th Gen Intel Core i5-11400F 2.60GHz, 1 CPU, 12 logical and 6 physical cores .NET SDK=5.0.301 [Host] : .NET 5.0.7 (5.0.721.25508), X64 RyuJIT DefaultJob : .NET 5.0.7 (5.0.721.25508), X64 RyuJIT
Method | Mean | Error | StdDev | Ratio | RatioSD | Gen 0 | Gen 1 | Allocated |
---|---|---|---|---|---|---|---|---|
Native LINQ | 724.329 us | 6.4686 us | 6.0507 us | 1.000 | 0.00 | 5.8594 | 2.9297 | 37,392 B |
Gridify | 736.854 us | 5.7427 us | 5.0907 us | 1.018 | 0.01 | 5.8594 | 2.9297 | 39,924 B |
DynamicLinq | 886.773 us | 8.4943 us | 7.5299 us | 1.225 | 0.01 | 19.5313 | 9.7656 | 125,122 B |
Sieve | 961.574 us | 6.6389 us | 5.8852 us | 1.328 | 0.01 | 8.7891 | 3.9063 | 55,186 B |
Fop | 2,933.332 us | 49.7515 us | 61.0994 us | 4.076 | 0.11 | 46.8750 | 23.4375 | 315,830 B |
WebApi Simple Usage example
// ApiController
public Paging<Person> GetPersons([FromQuery] GridifyQuery gQuery)
{
// Gridify => Filter,Sort & Apply Paging
// in short, Gridify returns data especially for data Grids.
return myDbContext.Persons.Gridify(gQuery);
}
complete request sample:
http://exampleDomain.com/api/GetPersons?pageSize=100&page=1&orderBy=FirstName&filter=Age%3D%3D10
Also, we can totally ignore GridifyQuery
http://exampleDomain.com/api/GetPersons
What is GridifyQuery (basic usage example)
GridifyQuery is a simple class for configuring Filtering,Paging,Sorting.
// usually, we don't need to create this object manually
// for example, we get this object as a parameter from our API Controller
var gQuery = new GridifyQuery()
{
Filter = "FirstName=John",
Page = 1,
PageSize = 20,
OrderBy = "LastName"
};
Paging<Person> pData =
myDbContext.Persons // we can use Any list or repository or EntityFramework context
.Gridify(gQuery); // Filter,Sort & Apply Paging
// pData.Count => Count persons with 'John', First name
// pData.Data => First 20 Persons with 'John', First Name
ApplyFiltering
Also, if you don't need paging and sorting features simply use the ApplyFiltering
extension instead of Gridify
.
var query = myDbContext.Persons.ApplyFiltering("name = John");
// this is equal to :
// myDbContext.Persons.Where(p => p.Name == "John");
see more examples in the tests
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. 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 was computed. 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 was computed. |
.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. |
-
.NETStandard 2.0
- Gridify (>= 2.3.3)
- Microsoft.EntityFrameworkCore (>= 2.0.3)
NuGet packages (5)
Showing the top 5 NuGet packages that depend on Gridify.EntityFramework:
Package | Downloads |
---|---|
EasyExtensions.EntityFrameworkCore
Ready-to-use library for simplifying the development of .NET applications. |
|
Pandatech.GridifyExtensions
Pandatech.Gridify.Extensions simplifies and extends the functionality of the Gridify NuGet package. It provides additional extension methods and functionality to streamline data filtering and pagination, making it more intuitive and powerful to use in .NET applications. Our enhancements ensure more flexibility, reduce boilerplate code, and improve overall developer productivity when working with Gridify. |
|
KFKLib.Gridify.AutoMapper
Package Description |
|
DataExplorer.EfCore.Unstable
Library featuring common patterns (Unit of Work, Repository, Specification, Services) in regard to working with EF Core. |
|
BBConsultoria.Antares.OpenSdk.Data.EntityFramework
Package Description |
GitHub repositories (1)
Showing the top 1 popular GitHub repositories that depend on Gridify.EntityFramework:
Repository | Stars |
---|---|
erwinkramer/bank-api
The Bank API is a design reference project suitable to bootstrap development for a compliant and modern API.
|
Version | Downloads | Last updated |
---|---|---|
2.15.1 | 3,150 | 11/14/2024 |
2.15.0 | 4,437 | 10/31/2024 |
2.15.0-preview7 | 2,681 | 8/28/2024 |
2.15.0-preview5 | 155 | 8/14/2024 |
2.15.0-preview4 | 565 | 7/18/2024 |
2.15.0-preview3 | 387 | 6/29/2024 |
2.15.0-preview2 | 230 | 6/22/2024 |
2.15.0-preview1 | 86 | 6/21/2024 |
2.14.2 | 57,843 | 6/8/2024 |
2.14.1 | 91,617 | 12/4/2023 |
2.14.0 | 8,996 | 11/18/2023 |
2.13.1 | 1,764 | 11/12/2023 |
2.13.0 | 193 | 11/11/2023 |
2.12.0 | 1,690 | 10/27/2023 |
2.11.1 | 16,760 | 10/6/2023 |
2.11.0 | 150 | 10/5/2023 |
2.10.1 | 4,028 | 9/28/2023 |
2.10.0 | 1,717 | 9/20/2023 |
2.10.0-preview1 | 117 | 9/19/2023 |
2.9.2 | 851 | 9/15/2023 |
2.9.1 | 7,440 | 8/22/2023 |
2.9.0 | 1,787 | 8/18/2023 |
2.8.4 | 46,866 | 4/18/2023 |
2.8.3 | 12,660 | 3/4/2023 |
2.8.2 | 45,444 | 12/7/2022 |
2.8.1 | 137,300 | 10/7/2022 |
2.8.0 | 8,616 | 7/22/2022 |
2.7.5 | 38,296 | 6/6/2022 |
2.7.4 | 8,021 | 4/22/2022 |
2.7.3 | 776 | 4/13/2022 |
2.7.2 | 774 | 4/12/2022 |
2.7.1 | 3,131 | 3/2/2022 |
2.7.0 | 487 | 3/1/2022 |
2.6.0 | 14,236 | 1/14/2022 |
2.5.0 | 4,842 | 12/27/2021 |
2.4.8 | 3,403 | 12/15/2021 |
2.4.7 | 301 | 12/14/2021 |
2.4.6 | 313 | 12/10/2021 |
2.4.5 | 482 | 12/5/2021 |
2.4.5-alpha5 | 198 | 12/5/2021 |
2.4.5-alpha4 | 211 | 12/5/2021 |
2.4.5-alpha1 | 167 | 12/2/2021 |
2.4.4 | 17,952 | 11/20/2021 |
2.4.3 | 713 | 11/19/2021 |
2.4.2 | 758 | 11/19/2021 |
2.4.1 | 1,958 | 11/18/2021 |
2.4.0 | 557 | 11/18/2021 |
2.3.3 | 458 | 11/16/2021 |
2.3.2 | 859 | 11/1/2021 |
2.3.1 | 1,187 | 10/19/2021 |
2.3.0 | 3,862 | 10/4/2021 |
2.2.1 | 347 | 9/30/2021 |
2.2.0 | 370 | 9/28/2021 |
2.1.0 | 440 | 9/21/2021 |
2.0.0 | 359 | 9/18/2021 |
2.0.0-beta.3 | 158 | 9/17/2021 |
2.0.0-beta.2 | 154 | 9/16/2021 |
2.0.0-beta.1 | 192 | 9/15/2021 |
2.0.0-alpha.1 | 175 | 8/12/2021 |
1.4.2 | 8,353 | 8/8/2021 |
1.4.1 | 464 | 8/4/2021 |
1.4.0 | 375 | 8/4/2021 |
1.3.5 | 1,013 | 7/28/2021 |
1.3.4 | 1,874 | 7/16/2021 |
1.3.3 | 468 | 7/1/2021 |
1.3.2 | 373 | 6/30/2021 |
1.3.1 | 363 | 6/23/2021 |
1.1.2 | 419 | 4/16/2021 |
1.1.1 | 349 | 4/16/2021 |
1.1.0 | 1,372 | 9/17/2020 |
1.0.5 | 538 | 7/3/2020 |
1.0.4 | 472 | 7/3/2020 |
1.0.3 | 551 | 7/2/2020 |
1.0.2 | 460 | 7/2/2020 |
1.0.1 | 434 | 7/2/2020 |
1.0.0 | 676 | 7/1/2020 |