Skip to content
bitzorcas
中EN

Concept

Solution Template and Profile Selection

Understand the 15 coupled bitzorcas-host Profiles, two ORMs, three base topologies, optional Platform modules, and industry extensions.

Last updated

bitzorcas-host is one native dotnet new solution template. The caller selects a complete ProfileChoice and one RuntimeAdapter. The engine copies a verified native tree and conditionally retains the selected Platform module or industry extension. No second-stage composer remains in the customer project.

[!NOTE] For greenfield projects prefer the bitz scaffolder: its scenario presets and orthogonal dimensions (including the Website/RiskControl platform capabilities and ReactAdmin-style frontend options) cover more ground than the template’s 15 combinations. The Profile matrix on this page targets teams that must verify one exact combination and existing template consumers. Both channels share the same verified consumer baseline; retirement conditions for the matrix are tracked in 0004-template-upgrade-map.json.

Four counts with different meanings

CountMeaningWhy it differs
15Public ProfileChoice valuesEach value is a complete, supported solution
2RuntimeAdapter valuessqlsugar and efcore
30Physical generation paths15 Profiles × 2 ORMs
3 / 6Base topologies / native asset treesEach topology has two ORM trees

“15 supported combinations” means public Profiles, not 30. ORM does not create another business Profile, but it changes package references, provider registration, and schema wiring.

The Help text is the authoritative rendering of this selection surface. The terminal below shows real output from dotnet new bitzorcas-host --help plus three typical selections (narrow-terminal line wraps are collapsed to logical lines; generic dotnet new options are omitted):

bitzorcas-host session
$ 
BitzOrcas.Modern Solution Template (C#)
作者: BitzOrcas.Modern
描述: 按 15 个合法 coupled preset 生成可运行 Consumer Solution,显式选择 SqlSugar/EF Core;公开支持 Platform none、Authorization 或 MasterData 单选闭包。
用法:
dotnet new bitzorcas-host [options] [模板选项]
模板选项:
-P, --ProfileChoice <选项> 一次选择业务类型、租户模式、部署方式与行业扩展;所有可选值都是可直接采用的合法组合。
类型: choice
mini-api-single 最小 API、单租户、独立部署、无行业扩展。
default-business-single Business Starter、单租户、独立部署;不附加行业扩展。
default-business-single-authorization Business Starter、单租户、Authorization runtime module。
default-business-single-masterdata Business Starter、单租户、MasterData runtime module。
default-business-single-finance Business Starter、单租户、Finance 扩展。
default-business-single-hr Business Starter、单租户、HR 扩展。
default-business-single-auction Business Starter、单租户、Auction 扩展。
default-business-single-legal Business Starter、单租户、Legal 扩展。
default-business-multi Business Starter、多租户、Aspire 编排;不附加行业扩展。
default-business-multi-authorization Business Starter、多租户、Aspire 编排、Authorization runtime module。
default-business-multi-masterdata Business Starter、多租户、Aspire 编排、MasterData runtime module。
default-business-multi-finance Business Starter、多租户、Aspire 编排、Finance 扩展。
default-business-multi-hr Business Starter、多租户、Aspire 编排、HR 扩展。
default-business-multi-auction Business Starter、多租户、Aspire 编排、Auction 扩展。
default-business-multi-legal Business Starter、多租户、Aspire 编排、Legal 扩展。
默认: default-business-single
-R, --RuntimeAdapter <选项> 物理注册并由生成后行为测试验证的数据库 provider。
类型: choice
sqlsugar 注册生产 SqlSugar adapter。
efcore 注册生产 EF Core adapter。
默认: sqlsugar

If your local Help differs from the panel above (legacy split selectors or internal derived parameters), verify the installed template version and package channel per troubleshooting before generating anything.

Resolution model

ProfileChoice
15 complete choices

Derive base topology, tenancy, deployment

Derive PlatformModule
none / authorization / masterdata

Derive IndustryExtension
none / finance / hr / auction / legal

RuntimeAdapter
sqlsugar / efcore

Select native asset tree

Conditional pruning and replacement

Consumer Solution
manifest + plan + source + tests

BaseProfileChoice, PlatformModule, and IndustryExtension are internal derived symbols. Exposing them in Help is a template-contract regression.

Three base topologies

Base ProfileWorkloadTenancyDeploymentProject shape
mini-api-singleAPIsinglenoneAPI, ServiceDefaults, Unit Tests, Architecture Tests
default-business-singlebusinesssinglenoneMini Host base + Business Starter Contracts/Application
default-business-multibusinessmultiaspireSingle Business base + AppHost

The public template does not generate a JobHost, Website, MiniApp, Integration Worker, Container, or Kubernetes assets. Those are later adoption or deployment concerns; they cannot be enabled through guessed options.

Fifteen public Profiles

ProfileChoiceTenancy / deploymentOptional closure
mini-api-singlesingle / noneno Business Starter, Platform module, or industry extension
default-business-singlesingle / noneBusiness Starter
default-business-single-authorizationsingle / noneAuthorization runtime module
default-business-single-masterdatasingle / noneMasterData runtime module
default-business-single-financesingle / noneFinance extension
default-business-single-hrsingle / noneHR extension
default-business-single-auctionsingle / noneAuction extension
default-business-single-legalsingle / noneLegal extension
default-business-multimulti / aspireBusiness Starter
default-business-multi-authorizationmulti / aspireAuthorization runtime module
default-business-multi-masterdatamulti / aspireMasterData runtime module
default-business-multi-financemulti / aspireFinance extension
default-business-multi-hrmulti / aspireHR extension
default-business-multi-auctionmulti / aspireAuction extension
default-business-multi-legalmulti / aspireLegal extension

Platform modules and industry extensions are wired differently:

  • authorization and masterdata add the corresponding Platform runtime package, configuration, and adoption tests;
  • finance, hr, auction, and legal enter the Business Starter Application as industry-extension packages;
  • Auction and Legal dependency closure may include Finance, while industryExtension remains auction or legal;
  • one public Profile selects one suffix. Cross-extension adoption is customer work after generation, not a manifest edit.

ORM is a physical choice

RuntimeAdapter is not descriptive metadata. SqlSugar output calls SqlSugar registration and schema paths. EF Core output calls EF Core registration and includes an EF migration contribution. Template verification asserts the selected provider exists and the opposite provider is absent.

Terminal window
# Baseline: generate physical SqlSugar wiring.
dotnet new bitzorcas-host -n Acme.Sql \
--ProfileChoice default-business-single \
--RuntimeAdapter sqlsugar
# Control: keep the Profile and switch only to EF Core.
dotnet new bitzorcas-host -n Acme.Ef \
--ProfileChoice default-business-single \
--RuntimeAdapter efcore

Choose the ORM when establishing the project. The template is not a runtime dual-provider switch; changing later is a persistence migration with model, schema, transaction, and regression implications.

Selection sequence

Answer four questions:

  1. Do you need only a framework shell, or a business module immediately? Choose Mini or Business.
  2. Must requests resolve multiple tenants from a verified JWT tenant_id claim? Choose Multi.
  3. Does the first release require Authorization, MasterData, or one industry extension? Select its suffix.
  4. Is the production baseline SqlSugar or EF Core? Select exactly one RuntimeAdapter.

If the first two answers are uncertain, use mini-api-single as a Feed, License, OpenAPI, and deployment probe. Do not treat it as a production business Profile: it has no Business Starter, multi-tenancy, or Aspire topology.

Typical selections

Minimum API probe

Terminal window
dotnet new bitzorcas-host -n Acme.Probe \
--ProfileChoice mini-api-single \
--RuntimeAdapter sqlsugar

Its Development Shell runs without SQL Server or RabbitMQ and is suited to the first-success path.

Terminal window
dotnet new bitzorcas-host -n Acme.Cases \
--ProfileChoice default-business-single-legal \
--RuntimeAdapter efcore

Output includes Business Starter and the Legal extension package. Business rules, permission catalogs, data migration, and production authentication remain customer work.

Multi-tenant authorization platform

Terminal window
dotnet new bitzorcas-host -n Acme.Platform \
--ProfileChoice default-business-multi-authorization \
--RuntimeAdapter sqlsugar

AppHost orchestrates SQL Server, Schema Migrator, and API. The Authorization variant also introduces RabbitMQ, authorization bootstrap, and separate persistence-identity parameters.

Generation boundary

The template generates:

  • customer-owned Hosts, Starter Module, and tests;
  • Directory.Packages.props, NuGet.Config, and commercial package references;
  • Host wiring for ORM, tenancy, OpenAPI, License, health, and schema;
  • composition-manifest.json, its schema, and composition-plan.json;
  • behavioral tests for selected Platform/Industry adoption.

It does not generate a finished business system or copy src/Framework/** or src/Platform/**. Frontend, production secrets, production License, data migration, container assets, and business acceptance remain outside template scope.

Verification strength

The foundation template gate physically creates all 30 generation paths. It then restores commercial packages, builds, tests, and publishes 22 stratified combinations, with trim publishing on 10. This release gate is separate from the repository’s routine merge gate.

Consumer teams still verify their exact Profile:

Terminal window
# Preserve repeatable evidence in restore → build → test → API publish order.
dotnet restore <Solution>.slnx
dotnet build <Solution>.slnx --configuration Release --no-restore
dotnet test <Solution>.slnx --configuration Release --no-build --no-restore
dotnet publish src/Hosts/<Name>.Api/<Name>.Api.csproj \
--configuration Release --no-build --no-restore

See also

100%

Scroll or use controls to zoom · drag when enlarged · double-click for 100% / 200%