Flexbase 10
This page contains self-contained upgrade instructions for FlexBase 10 dev builds.
Upgrade Builds
10.0.0-Dev-Build026 (January 2026)
10.0.0-Dev-Build026
What This Upgrade Changes
Consolidates exception handling into
FlexExceptionFilter+UseFlexExceptionHandler()Adds optional rate limiting support
Adds optional OpenTelemetry configuration
Standardizes EF Core feature configuration (Audit Trail, Soft Delete, Async Query Executor)
Updates generated queries/handlers to use true async (
*AsyncFlex)Adds optional Subscriber Idempotency configuration
Upgrade Steps
Step 1: Exception Handling Improvements
What to change
Replace
FlexStandardExceptionFilterwithFlexExceptionFilterin your MVC filter registration.Add
app.UseFlexExceptionHandler()after CORS.
Example
Step 2: Rate Limiting Support (Optional)
What to change
If you want rate limiting:
Keep it commented out if you don't need rate limiting.
Step 3: OpenTelemetry Configuration (Optional)
What to change
If you want OpenTelemetry, wire it from your WebAPI startup (exact method names vary by template):
Keep it commented out if you don't have an OTLP backend.
Step 4: EF Core Features Configuration
What to change
Create EfCoreFeaturesConfig.cs (if you don't already have it) and register it from wherever you build your DB services.
Typical wiring points:
If you use
*.EndPoint.CommonConfigs/CommonHostConfig.cs, add:services.AddFlexEfCoreFeatures(hostingContext.Configuration);
Otherwise, add it in your DB configuration method (often
DbEndPointConfig.AddFlexBaseDbServices(...)).
Step 5: Async Query Executor
What to change
Ensure your EF Core feature registration includes the async query executor, and update queries/handlers to use *AsyncFlex methods.
Examples:
Step 6: Query Template Updates
What to change
In existing generated queries/handlers, update these patterns:
.ToList()+Task.FromResult(...)→await ... .ToListAsyncFlex()and return directly.FirstOrDefault()+Task.FromResult(...)→await ... .FirstOrDefaultAsyncFlex()and return directly
Step 7: AppSettings Changes Summary
Add these sections if missing (merge into your environment-specific appsettings).
OpenTelemetry
FlexEfCore
RateLimiting (Optional)
Step 8: Subscriber Idempotency (Optional)
Subscriber idempotency ensures each subscriber processes a given event only once (even if the bus retries delivery).
Configuration
Startup wiring
Call this during service registration (where you register other Flex services):
If your solution does not have the EF Core idempotency package/namespace available yet, keep
StoreTypeasCache.
Step 9: AI-Assisted Upgrade Prompt
FlexBase 9 to 10 Migration Steps
These steps help you align an existing FlexBase 9 solution with the FlexBase 10 solution structure.
The older folder structure is still supported, so you can upgrade and run without doing these immediately. That said, adopting the newer structure typically improves navigation, consistency across modules, and the overall visual organization of the solution.
Step 1: Folder Structure Alignment
FlexBase 10 introduces a cleaner application structure that groups related concerns together (contracts vs orchestration vs business logic). This is the first recommended step when moving from FlexBase 9 to 10.
Target Folder Layout (FlexBase 10)
Below is the recommended FlexBase 10 folder structure. Replace {YourApplication} with your application name.
Note: Your solution may not include every database-specific project (e.g., only SqlServer migrations, no PostgreSql), and provider projects can vary by implementation. Keep the folder structure consistent and include only the projects that apply to your application.
Recommended Folder Moves / Renames
Use these mappings as guidance (project names are equivalent; focus on structure):
Queries
Old:
Application/Domain/{ProjectName}.Queries/New:
Application/DomainHandler/{ProjectName}.Queries/
DTOs / Messages / Shared Events
Old:
Application/Dto/...New:
Application/ControlContracts/...
Orchestration
Old:
Application/Orchestration/...New:
Application/ControlHub/...
PreBus + REST Clients
Old:
Application/PreBus/...andApplication/Orchestration/{ProjectName}.RESTClients/...New:
Application/DomainHandler/{ProjectName}.PreBus/...andApplication/DomainHandler/{ProjectName}.RESTClients/...
Handlers
Old:
Application/PostBus/{ProjectName}.Handlers.Plugins/...New:
Application/DomainHandler/{ProjectName}.Handlers/Suggested subfolders:
CommandHandlers/andSubscribers/
Infrastructure Providers
Ensure
Application/Infrastructure/Providers/exists for provider-related code (and keepBus/andDb/alongside it).
Naming Convention Update (NSB Handlers)
Old pattern:
*CommandHandler.csNew pattern:
*NsbHandler.cs
This typically means renaming both the file and class suffix from CommandHandler → NsbHandler.
Last updated