@@ -37,25 +37,25 @@ public override void GenerateCode(GeneratedMethod method, ISourceWriter writer)
3737 "Enroll the DbContext & IMessagingContext in the outgoing Wolverine outbox transaction" ) ;
3838 writer . Write ( $ "var { _envelopeTransaction . Usage } = new { typeof ( EfCoreEnvelopeTransaction ) . FullNameInCode ( ) } ({ _dbContext . Usage } , { _context . Usage } , { _scrapers . Usage } );") ;
3939 writer . Write (
40- $ "await { _context . Usage } .{ nameof ( MessageContext . EnlistInOutboxAsync ) } ({ _envelopeTransaction . Usage } );") ;
40+ $ "await { _context . Usage } .{ nameof ( MessageContext . EnlistInOutboxAsync ) } ({ _envelopeTransaction . Usage } ).ConfigureAwait(false) ;") ;
4141
4242
4343 writer . WriteComment ( "Start the actual database transaction" ) ;
44- writer . Write ( $ "using var { Transaction . Usage } = await { _dbContext . Usage } .Database.BeginTransactionAsync({ _cancellation . Usage } );") ;
44+ writer . Write ( $ "using var { Transaction . Usage } = await { _dbContext . Usage } .Database.BeginTransactionAsync({ _cancellation . Usage } ).ConfigureAwait(false) ;") ;
4545 writer . Write ( "BLOCK:try" ) ;
4646
4747 // EF Core can only do eager idempotent checks
4848 if ( _idempotencyStyle == IdempotencyStyle . Eager || _idempotencyStyle == IdempotencyStyle . Optimistic )
4949 {
50- writer . Write ( $ "await { _context . Usage } .{ nameof ( MessageContext . AssertEagerIdempotencyAsync ) } ({ _cancellation . Usage } );") ;
50+ writer . Write ( $ "await { _context . Usage } .{ nameof ( MessageContext . AssertEagerIdempotencyAsync ) } ({ _cancellation . Usage } ).ConfigureAwait(false) ;") ;
5151 }
5252
5353 Next ? . GenerateCode ( method , writer ) ;
5454
55- writer . Write ( $ "await { _envelopeTransaction . Usage } .CommitAsync({ _cancellation . Usage } );") ;
55+ writer . Write ( $ "await { _envelopeTransaction . Usage } .CommitAsync({ _cancellation . Usage } ).ConfigureAwait(false) ;") ;
5656 writer . FinishBlock ( ) ;
5757 writer . Write ( $ "BLOCK:catch ({ typeof ( Exception ) . FullNameInCode ( ) } )") ;
58- writer . Write ( $ "await { _envelopeTransaction . Usage } .RollbackAsync();") ;
58+ writer . Write ( $ "await { _envelopeTransaction . Usage } .RollbackAsync().ConfigureAwait(false) ;") ;
5959 writer . Write ( "throw;" ) ;
6060 writer . FinishBlock ( ) ;
6161 }
0 commit comments