Skip to content

Solution structure

Generated solution: ConnectSoft.Saas.MeteringTemplate.slnx - context projects under src/ plus the base-template/ submodule. Same layered layout as the other SaaS contexts with the ConnectSoft.Saas.Metering.* prefix.

Notable projects

Project (suffix) Role
.EntityModel IUsageMeter (root) with embedded counter/quota fields
.DomainModel / .DomainModel.Impl Processor/retriever + 8 inputs; defaults + 8 validators
.PersistenceModel.NHibernate UsageMeterEntityMap, repo, tenant filter
.MessagingModel Events/ (4 outbound) + Inbound/ (consumed stubs)
.FlowModel.MassTransit 4 saga state machines (3 wired, 1 unwired)
.ServiceModel(.RestApi/.Grpc) Contracts + adapters
.ActorModel.Orleans UsageMeterGrain + exception surrogates
.ApplicationModel / .Application DI wiring; host
.Metrics MeteringMetrics

Layer responsibilities: see template layering and reuse.

Tests

  • ConnectSoft.Saas.Metering.UnitTests
  • ConnectSoft.Saas.Metering.AcceptanceTests (Reqnroll)
  • ConnectSoft.Saas.Metering.ArchitectureTests (incl. MeteringOrleansGrainPartitionTests)

See testing.

See also