Modrich.Sdk.Api
0.1.0
dotnet add package Modrich.Sdk.Api --version 0.1.0
NuGet\Install-Package Modrich.Sdk.Api -Version 0.1.0
<PackageReference Include="Modrich.Sdk.Api" Version="0.1.0" />
<PackageVersion Include="Modrich.Sdk.Api" Version="0.1.0" />
<PackageReference Include="Modrich.Sdk.Api" />
paket add Modrich.Sdk.Api --version 0.1.0
#r "nuget: Modrich.Sdk.Api, 0.1.0"
#:package Modrich.Sdk.Api@0.1.0
#addin nuget:?package=Modrich.Sdk.Api&version=0.1.0
#tool nuget:?package=Modrich.Sdk.Api&version=0.1.0
Modrich.Sdk.Api
Meta-package for API / backend module projects in the Modrich modular foundation for .NET 10. Contains no types — it exists to bundle the Tier 1 references an API module needs.
What it pulls in
Modrich.Abstractions—IModule,IApiModule,IAppModule,IModuleMigrator,IModuleSeeder,[assembly: ModuleAssembly].Gatekeep.Authorization.Abstractions—IPermissionCatalog,IPermissionStore,IRolePermissionService,PermissionConstants,PermissionGroupAttribute,RequirePermissionAttribute.
It deliberately does not pull EF Core. Your module picks the persistence stack it wants (EF Core, Dapper, raw ADO, etc.).
⚠️
.Web(RCL) module projects must not reference this package — seeModrich.Sdk.Webinstead. Mixing them drags EF Core (when your module adds it) into the UI module's transitive closure.
Install
dotnet add package Modrich.Sdk.Api
In your module csproj:
<Project Sdk="Microsoft.NET.Sdk">
<ItemGroup>
<PackageReference Include="Modrich.Sdk.Api" />
</ItemGroup>
</Project>
Usage
using Gatekeep.Authorization;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using Modrich.Modules;
[assembly: ModuleAssembly]
namespace Acme.Orders;
public sealed class OrdersApiModule : IApiModule
{
public string Name => "Orders";
public IEnumerable<string> Permissions =>
[
"Orders.View",
"Orders.Edit",
];
public void RegisterApiDependencies(IServiceCollection services, IConfiguration configuration)
{
services.AddScoped<IOrderService, OrderService>();
services.AddScoped<IModuleMigrator, OrdersMigrator>();
services.AddScoped<IModuleSeeder, OrdersSeeder>();
}
}
The implicit Module.Orders.Access permission (Modrich.Modules.ModuleConstants.ModuleAccess("Orders")) is added automatically by the host's Modrich.Modularity registration.
Related packages
Modrich.Sdk.Web— meta-package for.Web(UI/RCL) modules.Modrich.Modularity— referenced by the host, not by modules.Modrich.Persistence— generic migration + seed runner the host invokes.
Versioning
Pinned to the same major as the underlying Tier 1 packages.
License
MIT.
| Product | Versions 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. |
-
net10.0
- Gatekeep.Authorization.Abstractions (>= 0.0.1)
- Modrich.Abstractions (>= 0.1.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.