The FluentUI folder contains two samples built around the same idea: use runtime metadata to generate FluentDataGrid instances instead of hand-authoring column definitions. One sample gets its metadata from EF Core and SQL Server; the other gets it from an OData service model and a generated client proxy.
| Project | Hosting model | Metadata source | Data source |
|---|---|---|---|
AdventureWorks\FluentUI.AdventureWorks.csproj |
Interactive server rendering | EF Core IEntityType metadata |
SQL Server AdventureWorks database |
TripPin\FluentUI.TripPin.csproj |
Blazor WebAssembly | OData EDM metadata | Public TripPin OData v4 service |
Both current projects target net10.0. Package versions are managed centrally in Directory.Packages.props.
Although the data sources are different, both samples follow the same runtime pipeline:
- Discover available entities from a metadata model.
- Build a navigation menu from that metadata.
- Accept
?entity=...in the main page. - Materialize an
IQueryable<T>for the selected entity set. - Generate
PropertyColumn<,>components for scalar properties andTemplateColumn<TEntity>components for complex types dynamically. - Create a custom equality comparer so row multi-select works for types only known at runtime.
- Render everything through a generic
PaginatedDataGrid<T>.
That makes the samples useful as references for admin explorers, diagnostics tools, and schema-driven internal applications.
Directory.Packages.props centralizes the versions for:
Microsoft.FluentUI.AspNetCore.Components- Fluent UI DataGrid adapters for Entity Framework and OData
- EF Core SQL Server packages
- OData client packages
The presence of both .NET 9 and .NET 10 package properties in that file reflects central package management, but the sample projects themselves currently compile for net10.0.
AdventureWorks is a server-rendered schema explorer over a restored SQL Server sample database.
Key implementation points:
Program.csregistersAddFluentUIComponents().AddDataGridEntityFrameworkAdapter()AddPooledDbContextFactory<AdventureWorksContext>keeps context creation efficient for interactive requests- SQL Server options enable
HierarchyId,NetTopologySuite, and retry-on-failure Components\Layout\NavMenu.razorgroups entities by schema and links to/?entity=<schema.Table>Components\Pages\Home.razorreflects overDbContext.Set<TEntity>()to create the runtime queryComponents\Controls\FluentDataGridEntityHelpers.csclassifies each property into one of three tiers: scalar properties becomePropertyColumn<,>instances;xml,json,geography, andgeometryproperties becomeTemplateColumn<TEntity>instances with built-in summarising renderers; keys, foreign keys, and opaque types (uniqueidentifier,hierarchyid,rowversion) are excluded entirely
PaginatedDataGrid.razor switches between paging and virtualization by either creating a PaginationState or leaving it null.
Docs: AdventureWorks\Readme.md
TripPin is a browser-hosted metadata explorer for the public OData sample service.
Key implementation points:
Program.csregistersAddODataClient("TripPin").AddHttpClient()- A scoped
Containeris built from the TripPin service root and the generated proxy types underConnected Services\TripPinService BuildingRequestremovesOData-MaxVersionandOData-Versionheaders before requests are sentLayout\NavMenu.razorenumerates EDM entity sets fromContainer.Format.LoadServiceModel()Pages\Home.razorresolves the CLR type for the selected entity set and reflects overContainer.CreateQuery<TEntity>(...)Controls\FluentDataGridEntityHelpers.csskips collection and complex properties because they do not map cleanly to simple grid columns
This sample is entirely browser-hosted; there is no local API or database in the solution.
Docs: TripPin\Readme.md
From the repository root:
dotnet build .\FluentUI.Samples.sln
dotnet run --project .\FluentUI\AdventureWorks\FluentUI.AdventureWorks.csproj
dotnet run --project .\FluentUI\TripPin\FluentUI.TripPin.csprojAdventureWorks also requires a valid ConnectionStrings:AdventureWorks entry in AdventureWorks\appsettings.json.
| If you need a reference for... | Start with |
|---|---|
| Dynamic Fluent UI grid columns from EF Core metadata | AdventureWorks |
| Dynamic Fluent UI grid columns from OData metadata | TripPin |
| Reflection-based row equality for metadata-driven grids | both samples' Home.razor pages |
| Fluent UI navigation built from runtime schema information | both NavMenu.razor files |
| Server-rendered interactive Fluent UI app | AdventureWorks |
| Pure WebAssembly Fluent UI app | TripPin |