Vorn.EntityManagement.Server
5.0.0-rc7
dotnet add package Vorn.EntityManagement.Server --version 5.0.0-rc7
NuGet\Install-Package Vorn.EntityManagement.Server -Version 5.0.0-rc7
<PackageReference Include="Vorn.EntityManagement.Server" Version="5.0.0-rc7" />
<PackageVersion Include="Vorn.EntityManagement.Server" Version="5.0.0-rc7" />
<PackageReference Include="Vorn.EntityManagement.Server" />
paket add Vorn.EntityManagement.Server --version 5.0.0-rc7
#r "nuget: Vorn.EntityManagement.Server, 5.0.0-rc7"
#:package Vorn.EntityManagement.Server@5.0.0-rc7
#addin nuget:?package=Vorn.EntityManagement.Server&version=5.0.0-rc7&prerelease
#tool nuget:?package=Vorn.EntityManagement.Server&version=5.0.0-rc7&prerelease
Vorn.EntityManagement.Server
Vorn.EntityManagement.Server brings the core Entity Management abstractions to SignalR. It provides a strongly typed hub base that mirrors the MediatR-backed IEntityService surface, pushes entity notifications to connected clients, and ships helpers for Entity Framework Core to keep your database aligned with the runtime model.
Highlights
- Drop-in hub base – derive from
EntityServer<TDto, TDescriptorDto, TService>to expose every CRUD and descriptor-driven query over SignalR without reimplementing handlers. - Ambient interception context – client supplied interception settings are flowed into
IEntityUserServiceandIEntityTimeServiceso audit behaviors, authorization, and caching continue to work in real-time scenarios. - Notification relay – the included
EntityNotificationHandlerlistens for domainEntityNotificationCoreevents and fans them out through your SignalR hub using either typed or untypedIHubContextinstances. - EF Core extensions –
ModelBuilderExtensionscentralize the DateTimeOffset⇄UTC conversions and soft-delete query filters expected by the core package, removing duplicated configuration.
Getting started
1. Install the package
The server NuGet package already bundles the core abstractions and SignalR hub base, so a single dependency brings everything you need.
dotnet add package Vorn.EntityManagement.Server
2. Register infrastructure
Add the core services, MediatR handlers, and SignalR hub support during startup. If you use the source generator registration from the base library, most services (repositories, caches, interceptors) are already wired up.
builder.Services.AddSignalR();
builder.Services.AddSingleton<IEntityUserService, HttpContextEntityUserService>();
builder.Services.AddSingleton<IEntityTimeService, EntityTimeService>();
// Optional: your entity service implementation (registered via generator or manually)
builder.Services.AddScoped<DocumentService>();
// Forward MediatR notifications to connected clients
builder.Services.AddTransient<INotificationHandler<EntityNotificationCore>, EntityNotificationHandler>();
3. Configure Entity Framework Core
When your aggregates derive from Entity, apply the provided model builder extensions so the database schema respects the UTC timestamps and soft-delete behavior.
public sealed class AppDbContext(DbContextOptions<AppDbContext> options)
: DbContext(options)
{
protected override void OnModelCreating(ModelBuilder modelBuilder)
{
base.OnModelCreating(modelBuilder);
modelBuilder
.ConfigureEntityDateTimeOffsetConversions()
.ConfigureEntitySoftDeleteFilters();
}
}
4. Create a hub
Derive a hub from EntityServer and pass your IEntityService implementation into the base class. The hub instantly exposes AddAsync, UpdateAsync, GetListAsync, descriptor paging, and the rest of the CRUD surface defined by the core library.
using Vorn.EntityManagement.SignalR.Server;
public sealed class DocumentHub(DocumentService service, IEntityUserService entityUserService)
: EntityServer<DocumentDto, DocumentDescriptorDto, DocumentService>(service, entityUserService)
{ }
app.MapHub<DocumentHub>("/hubs/documents");
5. Emit notifications
Any EntityNotificationCore published by the persistence interceptor or your own handlers is automatically routed to every connected client. Consumers of Vorn.EntityManagement.SignalR.Client (or your own typed hub client) receive them through EntityClient.EntityNotificationReceived and can refresh local state accordingly.
Customization tips
- Override individual hub methods if you need extra validation or to add domain-specific parameters. Call the base implementation to reuse the default SignalR contract.
- Inject other hub services (logging, authorization handlers, etc.) through the derived hub constructor; the base class keeps its dependencies minimal.
- If you maintain long-lived background operations, resolve
IHubContext<EntityServer<...>>directly from DI and send notifications or group messages using the same entity DTO types.
With these building blocks in place, your entity services can serve real-time clients with no additional CRUD plumbing.
| 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
- MediatR (>= 12.5.0)
- Microsoft.AspNetCore.SignalR.Core (>= 1.2.0)
- Microsoft.EntityFrameworkCore (>= 8.0.19)
- Microsoft.Extensions.Caching.Memory (>= 8.0.1)
- Vorn.EntityManagement.Common (>= 5.0.0-rc1)
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 |
|---|---|---|
| 5.0.0-rc7 | 146 | 10/8/2025 |
| 5.0.0-rc6 | 152 | 10/7/2025 |
| 5.0.0-rc5 | 134 | 10/7/2025 |
| 5.0.0-rc2 | 142 | 10/6/2025 |
| 4.6.0-rc7 | 136 | 10/5/2025 |
| 4.6.0-rc6 | 127 | 10/5/2025 |
| 4.6.0-rc5 | 132 | 10/5/2025 |
| 4.6.0-rc4 | 127 | 10/5/2025 |
| 4.6.0-rc3 | 132 | 10/5/2025 |
| 4.6.0-rc2 | 132 | 10/5/2025 |
| 4.6.0-rc1 | 136 | 10/5/2025 |
| 4.6.0-delta | 142 | 10/5/2025 |
| 4.6.0-beta | 122 | 10/5/2025 |
| 4.6.0-alpha | 132 | 10/5/2025 |