Vorn.EntityManagement.SignalR.Server 4.6.0

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

Vorn.EntityManagement.SignalR.Server

Philosophy

The SignalR server package extends Vorn.EntityManagement into the real-time domain. Rather than duplicating CRUD logic for hub endpoints, the server hub delegates to your existing IEntityService implementation so every entity mutation flows through the same MediatR pipeline. This keeps server push notifications consistent with the rest of your application and lets behaviors such as caching, audit logging, and validation remain centralized.

Key ideas that shape the server library:

  • Reuse application servicesEntityServer<TDto, TDescriptorDto, TEntityService> exposes hub methods that forward to the injected entity service so that your existing command/query handlers stay authoritative.
  • Ambient context – Clients can call SetInterceptionConfig to push user/time metadata into IEntityUserService and IEntityTimeService, ensuring downstream handlers know who triggered the change.
  • Symmetry with the client – The exported hub methods mirror those used by the client package, keeping bidirectional contracts straightforward.

Getting started

1. Install the package

Install-Package Vorn.EntityManagement.SignalR.Server

2. Register dependencies

builder.Services.AddSingleton<IEntityUserService, HttpContextEntityUserService>();
builder.Services.AddSingleton<IEntityTimeService, EntityTimeService>();
builder.Services.AddSingleton<DocumentService>();

Ensure your service derives from IEntityService<TDto, TDescriptorDto> (for instance, by inheriting from EntityService<TEntity, TDescriptor, TDto, TDescriptorDto> in the core package).

3. Add the hub to your ASP.NET Core app

builder.Services.AddSignalR();
app.MapHub<DocumentHub>("/hubs/documents");
public sealed class DocumentHub(DocumentService service)
    : EntityServer<DocumentDto, DocumentDescriptorDto, DocumentService>(service)
{ }

4. Enrich telemetry and security

Client calls to SetInterceptionConfig populate context providers so MediatR behaviors can stamp auditing metadata or enforce permissions before the handler runs.

5. Notify clients

Because the hub delegates to your entity service, any notifications you publish from your handlers (for example via IHubContext<EntityServer<...>>) stay consistent across REST and SignalR flows.

Usage tips

  • Pair the server package with the Vorn.EntityManagement.SignalR.Client package to get a prebuilt client that speaks the same hub contract.
  • Apply standard SignalR features like groups, authentication, and authorization policies directly in your derived hub.
  • Override hub methods if you need additional validation before forwarding to the entity service; call base.AddAsync(dto) to reuse the default behavior.

Release artifacts

The README ships with the NuGet package so consumers on NuGet.org understand the philosophy and usage pattern without cloning the repository.

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
4.6.0 203 10/4/2025
4.5.0 204 9/26/2025
4.4.4 202 9/25/2025
4.4.0 208 9/24/2025
4.3.0 215 9/23/2025
4.2.0 210 9/23/2025
4.1.0 209 9/23/2025
4.0.0 242 9/22/2025
4.0.0-rc3 189 9/21/2025
4.0.0-rc1 187 9/21/2025
4.0.0-alpha 208 9/20/2025
3.6.0 332 9/17/2025
3.5.0 338 9/17/2025
3.4.0 332 9/17/2025
3.3.0 333 9/17/2025
3.2.0 339 9/17/2025
3.1.0 353 9/16/2025
3.0.0 340 9/16/2025