File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed
samples/CleanArchitectureSample/src/Web Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change 22using Common . Module . Events ;
33using Foundatio . Mediator ;
44using Orders . Module ;
5+ using Orders . Module . Messages ;
56using Products . Module ;
7+ using Products . Module . Messages ;
68using Reports . Module ;
79using Reports . Module . Messages ;
810using Scalar . AspNetCore ;
1416// Add Foundatio.Mediator with assemblies from all modules
1517builder . Services . AddMediator ( c =>
1618{
19+ // Register the mediator as scoped to ensure correct DI scope resolution
1720 c . SetMediatorLifetime ( ServiceLifetime . Scoped ) ;
18- c . AddAssembly < OrderCreated > ( ) ; // Common.Module events
21+ c . AddAssembly < OrderCreated > ( ) ; // Common.Module
22+ c . AddAssembly < CreateOrder > ( ) ; // Orders.Module
23+ c . AddAssembly < CreateProduct > ( ) ; // Products.Module
1924 c . AddAssembly < GetDashboardReport > ( ) ; // Reports.Module
2025} ) ;
2126
You can’t perform that action at this time.
0 commit comments