摘要: 一、LoadWith的使用(对加载的数据没有限制) DataClasses1DataContext datacontext = new DataClasses1DataContext(); //如果不设置为false,则LoadWith也没起到什么作用(无效), datacontext.DeferredLoadingEnabled = false;//关闭延迟加载,采用及时加载 DataLoadOptions options = new DataLoadOptions(); //如果关闭了延迟加载,也未采用LoadWith进行加载,则加载Products类的时候Categorie... 阅读全文
posted @ 2012-05-18 11:05 初雪之恋 阅读(505) 评论(0) 推荐(0) 编辑
摘要: 一、TransactionScope和CommittableTransaction构造函数其中重要参数:TransactionOptions option = new TransactionOptions();/* --隔离级别 级别一 read uncommitted System.Transactions.IsolationLevel.ReadUncommitted --未提交读 (俗称“脏读”,能够读取其他用户正在修改的尚未提交的数据,无法确保数据的正确性) 级别二 read committed System.Transactio... 阅读全文
posted @ 2012-05-18 09:36 初雪之恋 阅读(2063) 评论(0) 推荐(0) 编辑