asp.net-mvc-4 – 首先使用EntityFramework 6代码的MiniProfiler
发布时间:2020-12-16 03:29:10 所属栏目:asp.Net 来源:网络整理
导读:我试图将一个MiniProfiler连接到一个先使用EF6代码的现有项目,aaaand它只是让我疯了:) 问题是默认情况下MiniProfiler与EF 4.1一起使用,而对于6.0,他们已经实现了一种快速解决方案https://github.com/SamSaffron/MiniProfiler/pull/134 但似乎它对我不起作用.
我试图将一个MiniProfiler连接到一个先使用EF6代码的现有项目,aaaand它只是让我疯了:)
问题是默认情况下MiniProfiler与EF 4.1一起使用,而对于6.0,他们已经实现了一种快速解决方案https://github.com/SamSaffron/MiniProfiler/pull/134 但似乎它对我不起作用. System.InvalidOperationException: The Entity Framework provider type 'StackExchange.Profiling.Data.EFProfiledSqlClientDbProviderServices,MiniProfiler.EntityFramework6' registered in the application config file for the ADO.NET provider with invariant name 'System.Data.SqlClient' could not be loaded. Make sure that the assembly-qualified name is used and that the assembly is available to the running application. See http://go.microsoft.com/fwlink/?LinkId=260882 for more information. 有没有人遇到过类似的问题? 解决方法
EF6 nuget已经发布.它可用
here,可以使用Install-Package MiniProfiler.EF6 -Pre进行安装
要初始化,只需在应用程序启动逻辑中调用以下内容: using StackExchange.Profiling.EntityFramework6; ... protected void Application_Start() { MiniProfilerEF6.Initialize(); } 在以任何方式使用EF之前一定要调用它. (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |
相关内容
- asp.net-mvc-3 – 可以在ASP.NET MVC 3上安装ASP.NET MVC 4
- asp.net – 从代码隐藏更改GridView列属性
- asp.net-mvc-2 – 将复杂对象从View传递给Controller:一个
- asp.net-mvc – Mvc渲染动作/部分响应输出
- asp.net-mvc – 无论如何让mvc框架验证我的action参数,就像
- asp.net-mvc – 为现有的基于MVC的网站创建REST API
- asp.net – 将设置移动到另一个配置文件
- (18)ASP.NET Core 基于现有数据库创建EF模型(反向工程)
- asp.net – 如何解决“最大请求长度超出”异常?
- asp.net-mvc-2 – 使用Ninject返回null的HttpHandler属性注
推荐文章
站长推荐
- asp.net-core – 访问Raw Request Body
- asp.net-mvc – 在导航时维护url参数
- asp.net-mvc-3 – 如何不使用Ninject的内核作为资
- 一个ASP.NET应用程序(意外)在多个应用程序域或频
- ASP.Net – C# – SQL Server – 只刷新缓存的Da
- asp.net – 太多的Cookie OpenIdConnect.nonce导
- ASP.NET存储SQL中的图像并检索Asp:Image
- asp.net – 如何让我的转发器的Itemcommand事件不
- asp.net-mvc – 具有多个参数的ActionLink
- 玩玩asp.net 2.0的caching系列二 - RemoveOutput
热点阅读