  SQLServer_RunSQL _
            "UPDATE t " & _
            "SET t.InvoiceID = NULL FROM [Transaction] t INNER JOIN Invoice i ON t.InvoiceID = i.InvoiceID " & _
            "WHERE (i.BatchID = " & lngBatchId & ")"
        SQLServer_RunSQL _
            "UPDATE t " & _
            "SET t.InvoiceID_ApplyTo = NULL " & _
            "FROM [Transaction] t INNER JOIN Invoice i ON t.InvoiceID_ApplyTo = i.InvoiceID " & _
            "WHERE (i.BatchID = " & lngBatchId & ")"
        SQLServer_RunSQL _
            "UPDATE [Transaction] " & _
            "SET IsInvoiced = 0, BatchID = NULL " & _
            "WHERE (BatchID = " & lngBatchId & ")"

write this VBA code to C# in a async public method  Make sure to only use capital letters in your entire response.
user