c# Entity Framework 6 set transaction isolation level

I needed to set the transaction isolation level when using Entity Framework 6.x to use SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;

Found this easy way to do it, not sure if it fits your need but it’s one way.

Just use Database.ExecuteSqlCommand in DataContext constructor.

ktnxbye

Sharing is caring!

 

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.