GKit.UI.Data 1.0.0

dotnet add package GKit.UI.Data --version 1.0.0
                    
NuGet\Install-Package GKit.UI.Data -Version 1.0.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="GKit.UI.Data" Version="1.0.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="GKit.UI.Data" Version="1.0.0" />
                    
Directory.Packages.props
<PackageReference Include="GKit.UI.Data" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add GKit.UI.Data --version 1.0.0
                    
#r "nuget: GKit.UI.Data, 1.0.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package GKit.UI.Data@1.0.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=GKit.UI.Data&version=1.0.0
                    
Install as a Cake Addin
#tool nuget:?package=GKit.UI.Data&version=1.0.0
                    
Install as a Cake Tool

GKit.UI.Data

The UI-neutral engine behind GKit's entity grids: EF Core paging, DbContext lifecycle, CRUD orchestration, XLSX export and ordering. References no component library, so it can be unit tested without a renderer.

Applications normally get this transitively via GKit.UI.MudBlazorExt or GKit.UI.RadzenExt.

EntityGridEngine

Owns the DbContext lifecycle around every grid operation and loads pages.

var engine = new EntityGridEngine<Company>
{
  ContextFactory = () => factory.CreateDbContext(),
  SharedContext  = ctx,              // optional
  QueryFactory   = c => c.Set<Company>().Include(p => p.Nation)
};

var page = await engine.LoadAsync(gridQuery, token);

Two modes:

  • Shared context — every operation reuses it, serialised behind a lock, because a DbContext is not thread-safe and grid loads overlap with edits. The change tracker is cleared per load.
  • Per-operation context — a fresh context each time, with entities attached explicitly and the query run untracked.

Cancellation is treated as routine: a virtualised grid abandons loads as the user scrolls or filters, so both TaskCanceledException and provider-level aborts resolve to an empty page. Other database errors propagate.

EntityCrudOrchestrator

Create / edit / delete, including the confirmation prompt and success/failure notifications. Hooks (OnBeforeEdit, OnAfterNew, …) let a component intercept each step.

EditEntityDialogEngine

The submit flow: OnBeforeValidationAsync → validate → OnAfterValidationAsync → OnBeforeSubmitAsync → close. Works against IUiFormHandle, so MudBlazor's MudForm and Radzen's EditContext both drive the same sequence.

EntityLookupEngine

Search, value/item projection and display text for autocompletes. A failed search notifies and returns empty rather than faulting the form, since lookups fire per keystroke.

QueryOrderExtensions

query.OrderBy(sorts);              // dotted paths: "Nation.Name"
query.NullCheckingOrderBy(sorts);  // guards every intermediate step against null

NullCheckingOrderBy turns "A.B.C" into x => x.A == null ? default : (x.A.B == null ? default : x.A.B.C), so sorting on a nullable navigation does not throw.

XlsExportExtensions

await query.ToXlsAsync(title, columns, stream);           // columns: IEnumerable<ExportColumn>
await query.ToXlsAsync(title, columns, stream, styles);   // styles: XlsStyleOptions<T>

Adapters project their rendered columns onto ExportColumn(Title, PropertyPath, Format?), skipping template columns with no underlying property. Format is an Excel number format ("#,##0.00"), left null by the adapters.

styles is how an export is restyled without a subclass of XlsReporter<T> — see GKit.Reporting. The grids take it as an ExportStyles parameter and fall back to the XlsTheme registered by AddGKitUiCore, so

services.AddSingleton(XlsTheme.Default with { FontFamily = "Calibri", FontSize = 10 });
services.AddGKitMudBlazorUi();   // or AddGKitRadzenUi

restyles every grid export in the application, and

<ManagedGrid T="Movement" Exportable ExportStyles="_exportStyles" ... />

overrides it for one grid.

Product Compatible and additional computed target framework versions.
.NET 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (2)

Showing the top 2 NuGet packages that depend on GKit.UI.Data:

Package Downloads
GKit.UI.MudBlazorExt

MudBlazor adapter for the GKit UI components

GKit.UI.RadzenExt

Radzen adapter for the GKit UI components

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.0.0 48 9/23/2026