Vorn.Entities.Interface 8.2.0-rc3

This is a prerelease version of Vorn.Entities.Interface.
dotnet add package Vorn.Entities.Interface --version 8.2.0-rc3
                    
NuGet\Install-Package Vorn.Entities.Interface -Version 8.2.0-rc3
                    
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="Vorn.Entities.Interface" Version="8.2.0-rc3" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Vorn.Entities.Interface" Version="8.2.0-rc3" />
                    
Directory.Packages.props
<PackageReference Include="Vorn.Entities.Interface" />
                    
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 Vorn.Entities.Interface --version 8.2.0-rc3
                    
#r "nuget: Vorn.Entities.Interface, 8.2.0-rc3"
                    
#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 Vorn.Entities.Interface@8.2.0-rc3
                    
#: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=Vorn.Entities.Interface&version=8.2.0-rc3&prerelease
                    
Install as a Cake Addin
#tool nuget:?package=Vorn.Entities.Interface&version=8.2.0-rc3&prerelease
                    
Install as a Cake Tool

Vorn.Entities.Interface

Vorn.Entities.Interface delivers reusable Blazor component bases that understand the entity client contract. The components encapsulate SignalR lifecycle management, paging/search, dialogs, and localization so feature teams can build rich CRUD UIs with minimal boilerplate.

Prerequisites

Add the package to your Blazor project together with the client library and UI dependencies:

dotnet add package Vorn.Entities.Interface
dotnet add package Vorn.Entities.Client
dotnet add package MudBlazor

The components rely on abstractions from Vorn.Entities.Client.SignalR and confirmation dialogs in Vorn.Common.Interface (for the built-in ConfirmDialog/StrictConfirmDialog).

Component catalog

Component Purpose
EntityClientComponentBase<TClient, TDto, TDescriptorDto> Core base class that handles hub connections, busy/error state, notification listening, and helper methods (AddAsync, UpdateAsync, RemoveByIdAsync, etc.).
EntityGridBase<TClient, TDto, TDescriptorDto> Extends the base with MudBlazor grid integration, paging/search, and debounced filtering for list views.
EntityEditorBase<TClient, TDto, TDescriptorDto, TFormModel> Adds form orchestration, dialog prompts, and create/update/delete flows for modal editors or detail panes.

All components expect DTOs/descriptors derived from the common package (EntityDto, EntityDescriptorDto) and a typed client inheriting from EntityClient<TDto, TDescriptorDto>.

Building a list view

Derive from EntityGridBase to get paging, search, and SignalR-driven refresh out of the box:

@inherits DocumentGridBase

<MudDataGrid Items="Items" ServerData="OnGridServerData" Loading="IsBusy">
    <Columns>
        <PropertyColumn Property="@nameof(DocumentDto.Title)" Title="Title" />
        <TemplateColumn>
            <MudButton Variant="Variant.Text" OnClick="() => RowClicked.InvokeAsync(context)">
                Open
            </MudButton>
        </TemplateColumn>
    </Columns>
</MudDataGrid>

@code {
    public sealed class DocumentGridBase
        : EntityGridBase<DocumentClient, DocumentDto, DocumentDescriptorDto>
    {
        protected override void ApplyGridStateToDescriptor(GridState<DocumentDto> state)
            => Descriptor.Search = state.SearchTerms;
    }
}

The base class keeps Descriptor.Skip/Take synchronized with MudBlazor’s paging events and refreshes automatically when EntityNotification events arrive from the server.

Implementing an editor dialog

Use EntityEditorBase to integrate validation, localization, and confirmation dialogs:

public sealed class DocumentEditorBase
    : EntityEditorBase<DocumentClient, DocumentDto, DocumentDescriptorDto, DocumentFormModel>
{
    protected override DocumentFormModel CreateEmptyFormModel() => new();
    protected override DocumentFormModel MapToFormModel(DocumentDto entity)
        => new() { Title = entity.Title };
    protected override DocumentDto MapToDto(DocumentFormModel form)
        => Value is null ? new() { Title = form.Title } : Value with { Title = form.Title };
    protected override string GetDisplayName(DocumentDto entity) => entity.Title;
}

SaveAsync and DeleteAsync are already wired to the underlying client, and the component surfaces IsBusy/ErrorMessage so your Razor markup can provide feedback.

Handling notifications manually

Override OnNotificationAsync on the base component if you need to react to change events directly:

protected override Task OnNotificationAsync(EntityNotification notification)
{
    Snackbar.Add($"{notification.Args.EntityName} {notification.Args.Operation}");
    return RefreshAsync();
}

EntityClientComponentBase automatically subscribes/unsubscribes to notifications as the component is initialized or disposed, and it exposes StopClientOnDispose when you need to control SignalR lifetime.

Tips

  • Inject EntityInterceptionConfig to scope user/time metadata across a batch of operations without touching every call site.
  • Call SafeRunAsync from derived classes when performing read operations that should toggle IsBusy and capture errors.
  • Pair grids and editors within the same page by sharing the descriptor instance—filters applied in the grid automatically flow to editor refreshes.
Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  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.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  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

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
8.2.0-rc3 0 10/12/2025
5.0.1-preview.0.1 103 10/8/2025