Repository navigation
Partie Bundles
A bundle registers related Providers and Parties together. Declare a record whose primary constructor lists the step types in their registration order. Partie generates an attribute from the record's name, which you apply to a route or group.
Use the real step or nested bundle types as constructor parameters:
// ApplicationBundle.cs
public sealed record ApplicationBundle<TRequest, TResult>(
PartieSystemBundle<TRequest, TResult> Transactions,
QueryTimingPartie<TRequest, TResult> Timing
);PartieSystemBundle contains command unit-of-work handling. QueryTimingPartie is defined in Generic matching. The generated [ApplicationBundle] attribute expands its members in constructor order. The timing step matches queries; the unit-of-work step matches commands. Member constraints, Provider laziness, and context value selection still apply.
No marker attribute or partial declaration is required. The Bundle suffix is a naming convention; records made entirely of steps and bundles can use other names. Partie does not construct a bundle instance at runtime. Bundles can also come from a referenced project.
Members' [Parameter] values become arguments on the bundle attribute, including through nested bundles:
// CourseSearchBundle.cs
public sealed record CourseSearchBundle(
AcademicYearProvider Year,
LogCourseSearchPartie Logging
);[CourseSearchBundle("2027-2028")]
...The Name parameter on AcademicYearProvider receives 2027-2028. Its default remains available when the argument is omitted. Required arguments precede optional ones; defaults and params are preserved.
Members with the same parameter name share one attribute argument when their types and defaults agree. Incompatible definitions produce BRG005. Each bundle registration has its own argument values.
A bundle constructor may contain Providers, Parties, or nested bundles. Invalid members, cyclic bundles, and incompatible shared parameters produce BRG005 and prevent the affected route pipeline from being emitted.
Register a built-in bundle once at the scope where you need it. Adding its individual Partie again on a child route repeats that registration. See Routes and groups for inherited scope and Contexts for value ordering.
- 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