Vorn.EntityManagement.Server 5.0.0-rc7

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

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 IEntityUserService and IEntityTimeService so audit behaviors, authorization, and caching continue to work in real-time scenarios.
  • Notification relay – the included EntityNotificationHandler listens for domain EntityNotificationCore events and fans them out through your SignalR hub using either typed or untyped IHubContext instances.
  • EF Core extensionsModelBuilderExtensions centralize 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 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
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