UpdateMulti uses the transaction set of the collection it is called on, so that's covered.
Let's look at the code:
Pieter wrote:
I'm trying to perform a batch update (without fetching the data first) inside a transaction, but when I view the executed SQL code (in the Profiler) I don't see the transaction at all.
I'm I overlooking something (or just don't understand transactions?
)?
private static Guid GenerateBatchId()
{
Transaction transaction = new Transaction(IsolationLevel.Serializable, "Batch creation transaction");
THis line above already starts the transaction. It creates an open connection and opens a transaction. So after this line above it should have opened a connection AND a transaction.
So the problem is only that you don't see the transaction in the profile or is it that there's no action performed on the DB?