Zonit.Extensions.Organizations 10.0.0-preview.9

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

Zonit.Extensions.Organizations

Tenant / workspace context for ASP.NET Core and Blazor. Exposes the user's currently selected organization as the Organization value object — keeping authorization in one place (Zonit.Extensions.Auth).

NuGet Downloads

dotnet add package Zonit.Extensions.Organizations

What you get

  • IWorkspaceProvider.Organization : Organization — current tenant as VO. Returns Organization.Empty when none is selected.
  • IWorkspaceManager — write surface (Initialize(...), SwitchOrganizationAsync(id), exposes Workspace/Organizations/State).
  • IOrganizationSource — consumer-implemented contract for backend hydration.
  • A Blazor <ZonitOrganizationsExtension /> component that bridges prerendered state across render modes.

Setup

builder.Services.AddOrganizationsExtension();
app.UseMiddleware<OrganizationsMiddleware>();
@using Zonit.Extensions
<ZonitOrganizationsExtension />

Implement IOrganizationSource in your app (typically backed by EF Core).

Reading the workspace

@inject IWorkspaceProvider Workspace

@if (Workspace.Organization.HasValue)
{
    <p>Tenant: @Workspace.Organization.Name</p>
    <p>Id: @Workspace.Organization.Id</p>
}

Switching organization

@inject IWorkspaceManager Manager

<button @onclick="@(async () => await Manager.SwitchOrganizationAsync(orgId))">
    Switch
</button>

The change raises OnChange, observed by IWorkspaceProvider and any subscribers (incl. ExtensionsBase in the Website package).

Authorization is elsewhere

Earlier versions exposed IsPermission(string) / IsRole(string) on this provider with hard-coded "Developer" / "All" bypass paths. That is gone. Authorization lives in Zonit.Extensions.Auth ([RequirePermission], IAuthorizationService, <AuthorizeView>). Pure tenancy lives here.

License

MIT.

Product Compatible and additional computed target framework versions.
.NET net10.0 is compatible.  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 (3)

Showing the top 3 NuGet packages that depend on Zonit.Extensions.Organizations:

Package Downloads
Zonit.Extensions.Website

ASP.NET Core and Blazor web extensions providing base components (PageBase, PageEditBase, PageViewBase), navigation services, breadcrumbs management, toast notifications, cookie handling, and data protection utilities for building modern web applications.

Zonit.Services.Dashboard

Package Description

Zonit.Services.Manager

Package Description

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
10.0.0-preview.9 56 5/16/2026
10.0.0-preview.6 59 5/15/2026
10.0.0-preview.2 64 5/12/2026
0.1.52 133 1/15/2026
0.1.51 489 11/19/2025
0.1.50 434 11/18/2025
0.1.8 445 4/10/2025
0.1.7 338 1/29/2025
0.1.6 231 6/13/2024
0.1.5 221 6/6/2024
0.1.4 218 6/6/2024
0.1.3 238 6/5/2024
0.1.2 233 6/5/2024
0.1.1 200 6/3/2024
0.1.0 215 5/28/2024