Quantcast
Channel: Entity Framework
Viewing all articles
Browse latest Browse all 10318

Commented Issue: Database.UseTransaction may perform context initalization, which should be aware of the transaction infromation, but isn't [906]

$
0
0
When we let EF know about the user transaction, one can use:

context.Database.UseTransaction(myTransaction). Problem is, that under the covers it looks like this:

((EntityConnection)_internalContext.ObjectContext.Connection).UseStoreTransaction(transaction);

accessing ObjectContext property may result in this context being initialized WITHOUT the transaction information. We should make sure that any time we initialize ObjectContext, when the user transaction has been passed, this information gets passed to the ObjectContext initialization pipeline.
Comments: We need to discuss this with Diego to decide if we should consider a fix in EF6.

Viewing all articles
Browse latest Browse all 10318

Trending Articles