public async Task Execute(ICommand command) { using (_scope.BeginScope()) { await _mediator.Send(command); } }
public Task <TResult> ExecuteQueryAsync <TResult>(IQuery <TResult> query) { using (_scope.BeginScope()) { return(_mediator.Send(query)); } }