Vorn.Entities.Interface
8.2.0-rc3
dotnet add package Vorn.Entities.Interface --version 8.2.0-rc3
NuGet\Install-Package Vorn.Entities.Interface -Version 8.2.0-rc3
<PackageReference Include="Vorn.Entities.Interface" Version="8.2.0-rc3" />
<PackageVersion Include="Vorn.Entities.Interface" Version="8.2.0-rc3" />
<PackageReference Include="Vorn.Entities.Interface" />
paket add Vorn.Entities.Interface --version 8.2.0-rc3
#r "nuget: Vorn.Entities.Interface, 8.2.0-rc3"
#:package Vorn.Entities.Interface@8.2.0-rc3
#addin nuget:?package=Vorn.Entities.Interface&version=8.2.0-rc3&prerelease
#tool nuget:?package=Vorn.Entities.Interface&version=8.2.0-rc3&prerelease
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 toggleIsBusy
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 | Versions 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. |
-
net8.0
- Microsoft.AspNetCore.SignalR.Client.Core (>= 8.0.20)
- Vorn.Common.Interface (>= 2.9.0-rc4)
- Vorn.Entities.Client (>= 8.2.0-rc3)
- Vorn.Entities.Common (>= 8.2.0-rc3)
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 |