上一页 1 ··· 21 22 23 24 25 26 27 28 29 ··· 41 下一页
摘要: 原文:http://www.entityframeworktutorial.net/entityframework6/database-command-interception.aspx 本节,将学习如何在执行数据库命令时拦截EF。 EF 6提供了在对数据库执行ExecuteNonQuery,Exe 阅读全文
posted @ 2017-08-18 14:45 talentzemin 阅读(366) 评论(0) 推荐(0) 编辑
摘要: 原文:http://www.entityframeworktutorial.net/entityframework6/database-command-logging.aspx 本节,我们学习如何记录Entity Framework发送到数据库的命令和查询。 在EF 6之前,我们使用数据库跟踪工具或 阅读全文
posted @ 2017-08-18 14:37 talentzemin 阅读(494) 评论(0) 推荐(0) 编辑
摘要: 原文:http://www.entityframeworktutorial.net/entityframework6/code-based-configuration.aspx EF6引入了基于代码的配置。你仍可以使用以前在app.config的<entityframework>节点中配置的代码来配 阅读全文
posted @ 2017-08-17 11:30 talentzemin 阅读(237) 评论(0) 推荐(0) 编辑
摘要: 原文:http://www.entityframeworktutorial.net/entityframework6/async-query-and-save.aspx 你可以在.NET4.5下使用 EF6 DbContext异步执行查询和命令。 我们来看看如何先执行异步查询,然后再看对contex 阅读全文
posted @ 2017-08-14 17:31 talentzemin 阅读(376) 评论(0) 推荐(0) 编辑
摘要: 原文:http://www.entityframeworktutorial.net/code-first/code-based-migration-in-code-first.aspx 当你想在迁移中有更多的操作,比如设置列的默认值等时,基于代码的迁移就非常有用了。 Code-First有两个基于代 阅读全文
posted @ 2017-08-09 10:49 talentzemin 阅读(295) 评论(0) 推荐(0) 编辑
摘要: 原文:http://www.entityframeworktutorial.net/code-first/automated-migration-in-code-first.aspx EF4.3引入了自动迁移,因此你不必在代码文件中手动处理数据库迁移。对于你在域类中进行的每次更改, 只需要在Pack 阅读全文
posted @ 2017-08-09 10:28 talentzemin 阅读(276) 评论(0) 推荐(0) 编辑
摘要: 原文:http://www.entityframeworktutorial.net/code-first/migration-in-code-first.aspx EF Code-First在EF 4.3之前有不同的数据库初始化策略,如CreateDatabaseIfNotExists,DropCr 阅读全文
posted @ 2017-08-09 10:18 talentzemin 阅读(147) 评论(0) 推荐(0) 编辑
摘要: 原文:http://www.entityframeworktutorial.net/code-first/seed-database-in-code-first.aspx 你可以在数据库初始化过程中将数据插入到数据库表中。 如果要为应用程序提供一些测试数据或为应用程序提供一些默认的主数据的话,这将非 阅读全文
posted @ 2017-08-09 10:13 talentzemin 阅读(472) 评论(0) 推荐(0) 编辑
摘要: 原文:http://www.entityframeworktutorial.net/code-first/turn-off-database-initialization-in-code-first.aspx 你也可以关闭应用程序的DB初始化程序。 假设,对于生产环境,你不想丢失现有数据,那么可以关 阅读全文
posted @ 2017-08-08 17:31 talentzemin 阅读(213) 评论(0) 推荐(0) 编辑
摘要: 原文:http://www.entityframeworktutorial.net/code-first/database-initialization-strategy-in-code-first.aspx 在第一次运行Code-First应用程序后已经创建了一个数据库,但是第二次启动时呢?每次运 阅读全文
posted @ 2017-08-08 17:28 talentzemin 阅读(280) 评论(0) 推荐(0) 编辑
上一页 1 ··· 21 22 23 24 25 26 27 28 29 ··· 41 下一页