A .NET NuGet library extending Gridify with streamlined filtering, ordering, pagination, aggregation, and column distinct value queries for EF Core. Used by all PandaTech backend projects.
- Single library project:
src/GridifyExtensions/ - All extension methods live in
QueryableExtensions.cs FilterMapper<T>extends Gridify'sGridifyMapper<T>with default ordering, encrypted columns, and fluent API- Mapper instances are discovered via reflection at startup (
AddGridify()) and stored in aFrozenDictionary WebApplicationBuilderExtensions.cshandles registration and Gridify global config
Extensions/QueryableExtensions.cs- core extension methods (filtering, paging, distinct, aggregation)Extensions/WebApplicationBuilderExtensions.cs- DI registration and mapper discoveryModels/FilterMapper.cs- base mapper class with default ordering and encrypted column trackingModels/GridifyQueryModel.cs- paged query model (inherits Gridify's GridifyQuery)Models/GridifyCursoredQueryModel.cs- cursor-based query model (standalone, not inheriting GridifyQuery)Models/AggregateQueryModel.cs- aggregation model (standalone: Filter + PropertyName + AggregateType)Models/ColumnDistinctValueCursoredQueryModel.cs- distinct value query (extends GridifyCursoredQueryModel)Operators/FlagOperator.cs- custom#hasFlagbitwise operator
GridifyQueryModelinherits from Gridify'sGridifyQueryand overrides properties for validationGridifyCursoredQueryModelandAggregateQueryModelare standalone (no Gridify base) with internalToGridifyQueryModel()for interop with Gridify's filtering- Encrypted columns tracked via
HashSet<string>in FilterMapper; decryption happens client-side viaFunc<byte[], string> - String distinct values use smart ordering: nulls first, exact match, length, alphabetical
PagedResponse<T>andCursoredResponse<T>are records
dotnet build src/GridifyExtensions/GridifyExtensions.csprojTargets: net8.0, net9.0, net10.0