private async Task SaveToDb() { using (var t = new TransactionScope(TransactionScopeAsyncFlowOption.Enabled)) { foreach (var orderItem in orderItems) { await orderDataAccess.UpdateOrderItem(orderItem); } foreach (var statusHistoryRow in pendingStatusWechselHistoryRows) { await orderDataAccess.AddStatusHistoryRecord(statusHistoryRow.OrderItemId, statusHistoryRow.FromStatus, statusHistoryRow.ToStatus, statusHistoryRow.ChangedBy); } t.Complete(); } }