随笔分类 -  EF

摘要:1.在类库上右键->添加新建项->ADO.NET 实体数据模型->默认Model1->来自数据库的EF设计器 2.新建数据库连接,一直下一步。 3.生成Model1.edmx文件,展开后会看到自己的数据库表对应的实体类及数据库操作类。 阅读全文
posted @ 2016-03-11 20:28 今天起个早 阅读(3046) 评论(0) 推荐(0)
摘要:命名空间System.Transactions;using (TransactionScope scope = new TransactionScope()){ //Do something with context1 //Do something with context2 /... 阅读全文
posted @ 2015-07-07 10:54 今天起个早 阅读(181) 评论(0) 推荐(0)