此代码是否有任何副作用:
///This code runs per request
public static MyObjectContext CreateEntity()
{
MyObjectContext db=new MyObjectContext();
db.Connection.Open();
var con = (SqlConnection)((EntityConnection)hi.Connection).StoreConnection;
SqlCommand cmd = new SqlCommand("set transaction isolation level read uncommitted",con);
cmd.ExecuteNonQuery();
return db;
}
现在“db”实例将运行 ReadUncommited 模式?