Open Closed

UnitOfWork on Background job #3194

barrett2474 created


I have a background job that when it executes, I wish to do a number of database calls. It's important that they are wrapped in a single transaction (UnitOfWork).

Question Will using the Attribute "UnitOfWork" on the said AsyncBackgroundJob be the best way?

  [UnitOfWork(isTransactional: true)]
  public override async Task ExecuteAsync(SaveTransactionFileUploadDto args)

Thanks you for your time,

Regards John

  • ABP Framework version: v5.2.2
  • UI type: Blazor WASM
  • DB provider: EF Core
  • Tiered (MVC) or Identity Server Separated (Angular): no

1 Answer(s)
  • 1
    maliming created
    Support Team


    yes, and you can also begin a uow manually.