Getting started¶
Scaffold¶
dotnet new install ConnectSoft.Saas.TenantsTemplate.Installer
dotnet new connectsoft-saas-tenants -n ConnectSoft.MyTenantsService -o ./MyTenantsService
Clone with --recurse-submodules when working from source (base template submodule).
Build and run¶
cd MyTenantsService
dotnet build ConnectSoft.Saas.TenantsTemplate.slnx
dotnet run --project src/ConnectSoft.Saas.Tenants.Application
REST is at api/tenants; gRPC exposes TenantManagementService / TenantQueryService.
Try it¶
# create a draft tenant, then activate it
curl -X POST https://localhost:5001/api/tenants/draft -H "Content-Type: application/json" -d '{ "tenantKey": "acme", "displayName": "Acme", "residencyRegion": "eu" }'
curl -X PUT https://localhost:5001/api/tenants/activate -H "Content-Type: application/json" -d '{ "tenantId": "<id>" }'
SampleTenantSeed provides a seeded tenant for query scenarios.
Next steps¶
- Configuration for multitenancy and persistence.
- Base Template for inherited host capabilities.