Skip to content

Introduction

Greetings!

Gridify is an exceptional dynamic LINQ library designed to simplify the process of converting strings into LINQ queries. It offers remarkable performance and ease-of-use, making it effortless to apply filtering, sorting, and pagination utilizing text-based data.

Features

Here are some notable features of Gridify:

  • Fast and user-friendly
  • Supports filtering, sorting, and pagination
  • Enables conversion from strings to LINQ queries
  • Supports nested queries and sub-collections
  • Allows mapping from strings to objects
  • Supports query compilation
  • Supports DocumentDBs
  • Compatible with collection indexes
  • Custom operators
  • Can be used with any collection that supports LINQ
  • Compatible with object-mappers like AutoMapper
  • Compatible with ORMs, particularly Entity Framework
  • Supports Elasticsearch DSL query
  • Javascript/Typescript gridify-client

Examples

To provide a better understanding of Gridify's functionality, we have prepared a few examples:

Performance

Filtering is the most expensive feature in Gridify. The following benchmark compares filtering in various popular dynamic LINQ libraries. Interestingly, Gridify outperforms even Native LINQ in terms of speed. It's worth mentioning that other features like Pagination and Sorting in Gridify have minimal impact on performance.

MethodMeanErrorStdDevRatioAllocatedAlloc Ratio
Gridify599.8 us2.76 us2.45 us0.9236.36 KB1.11
Native_LINQ649.9 us2.55 us2.38 us1.0032.74 KB1.00
DynamicLinq734.8 us13.90 us13.01 us1.13119.4 KB3.65
Sieve1,190.9 us7.41 us6.93 us1.8353.05 KB1.62
Fop2,637.6 us8.59 us7.61 us4.06321.57 KB9.82
CSharp_Scripting216,863.8 us4,295.66 us6,021.92 us336.6423660.26 KB722.71
Details

BenchmarkDotNet v0.13.10, Windows 11 (10.0.22621.2715/22H2/2022Update/SunValley2) 12th Gen Intel Core i7-12800H, 1 CPU, 20 logical and 14 physical cores .NET SDK 8.0.100 [Host] : .NET 8.0.0 (8.0.23.53103), X64 RyuJIT AVX2

This Benchmark is available Here