【发布时间】:2015-05-03 02:46:04
【问题描述】:
我正在使用Entity Framework 6.1.3,并且刚刚实现了一个拦截器,以便在本地开发时可以查看生成的SQL。当我将网站发布到 LIVE 环境时,禁用此拦截器的正确方法是什么?我目前在发布时通过 Web Deploy 使用 Web Config 转换,我只是想确保该站点没有尝试写入不存在的文件。
我从这篇文章开始:https://msdn.microsoft.com/en-us/data/jj556606.aspx#Interceptors
这是我的配置部分:
<interceptors>
<interceptor type="System.Data.Entity.Infrastructure.Interception.DatabaseLogger, EntityFramework">
<parameters>
<parameter value="C:\Temp\LogOutput.txt"/>
<parameter value="true" type="System.Boolean"/>
</parameters>
</interceptor>
【问题讨论】:
标签: c# entity-framework web-config entity-framework-6 webdeploy