Repository navigation
AspNetCore Bundles
Register system bundles on the root route group and database bundles on the groups that use them. See Partie bundles for member ordering and parameter forwarding.
For an ASP.NET Core API, register HTTP mapping before command unit-of-work handling:
[BrigadeGroup("/api/v1")]
[AspNetSystemBundle]
[PartieSystemBundle]
[ExpoSystemBundle]
public static partial class ApiRoutes
{
...
}[AspNetSystemBundle] comes from Brigade.Net.Partie.AspNetCore and contains HttpResultPartie. [PartieSystemBundle] comes from Brigade.Net.Partie and contains UnitOfWorkPartie. [ExpoSystemBundle] comes from Brigade.Net.Partie.Extensions.Expo and contains request validation.
This order lets HTTP mapping see downstream failures and places validation inside the command unit of work. Add Expo's packages before using its bundle; see Validation with Expo.
Register a database bundle on the group or route that uses its named connection:
[BrigadeGroup("/courses")]
[MisePostgreSqlBundle("CourseDatabase")]
private static partial class Courses
{
...
}Place this group inside the root group above. The bundle supplies named configuration, query readers, command transactions, and command writers. Providers run when their outputs are needed.
The integration namespaces and bundle attributes are:
| Namespace | Attribute |
|---|---|
Brigade.Net.Partie.Extensions.Mise.SqlServer |
[MiseSqlServerBundle(name)] |
Brigade.Net.Partie.Extensions.Mise.PostgreSQL |
[MisePostgreSqlBundle(name)] |
Brigade.Net.Partie.Extensions.Mise.SQLite |
[MiseSqliteBundle(name)] |
Brigade.Net.Partie.Extensions.Mise.MySQL |
[MiseMySqlBundle(name)] |
Brigade.Net.Partie.Extensions.Mise.MariaDb |
[MiseMariaDbBundle(name)] |
See Database access with Mise for packages, connection strings, and consuming readers and writers.
Use the real step or nested bundle types as constructor parameters:
// ApiBundle.cs
public sealed record ApiBundle<TRequest, TResult>(
Brigade.Net.Partie.AspNetCore.AspNetSystemBundle<TRequest, TResult> Http,
PartieSystemBundle<TRequest, TResult> Transactions,
QueryTimingPartie<TRequest, TResult> Timing
);QueryTimingPartie is defined in Generic matching. Register the generated attribute:
[BrigadeGroup("/api/v1")]
[ApiBundle]
public static partial class ApiRoutes
{
...
}The bundle expands in place. Its timing step matches queries; the unit-of-work step matches commands. Member constraints, Provider laziness, and context value selection still apply.
See Routes and groups for registration scope.
- Home
- Getting started
-
Package guides
- Partie
- Expo
-
Mise
- Database setup
- Table mappings
- Aliases
- Relationships
- Result rows
- SQL interpolation
- Queries
- Filtering
- Joins
- Aggregation
- Paging and ordering
- Subqueries
- Set operations
- Common table expressions
- Readers
- Streaming
- Writers
- Inserts
- Updates
- Deletes
- Returned rows
- Custom SQL and procedures
- Transactions
- Resource lifetimes
- Database dialects
- Diagnostics
- Integrations
- Recipes
- Reference
- Troubleshooting
- Development