Why isn't my transaction escalating to DTC?

DTC is disabled on my machine. It is my understanding that this code should fail, because it uses two data contexts in the same transaction. So, why does it work? (Note: I tried this using .NET 3.5 and .NET 4.0.)

using (TransactionScope transactionScope = new TransactionScope())
{
    UpdateEta();
    UpdateBin();

    transactionScope.Complete();
}

Here are the DAL methods that get called:

public static void UpdateBin(Bin updatedBin)
{
    using (DevProdDataDataContext dataContext = new DevProdDataDataContext(ConnectionString))
    {
        BinRecord binRecord = (from bin in dataContext.BinRecords
                               where bin.BinID == updatedBin.BinId
                               select bin).FirstOrDefault();

        binRecord.BinID   = updatedBin.BinId;
        binRecord.BinName = updatedBin.BinName;

        dataContext.SubmitChanges();
    }
}  

public static void UpdateEta(Eta updatedEta)
{
    using (DevProdDataDataContext dataContext = new DevProdDataDataContext(ConnectionString))
    {
        EtaRecord etaRecord = (from eta in dataContext.EtaRecords
                               where eta.ID == updatedEta.ID
                               select eta).FirstOrDefault();

        etaRecord.ID    = updatedEta.ID;
        etaRecord.Title = updatedEta.Title;

        dataContext.SubmitChanges();
    }
}
9
задан Bob Horn 13 March 2013 в 17:35
поделиться