在使用 EF 出现 using 语句中使用的类型必须可隐式转换为“System.IDisposable

今天写在这里分享给大家

出现这样的问题,是因为没有引用  EntityFramework 这个程序集

如果项目中没有出现这个程序及请使用Nuget 来安装这个程序集,就不会出现这个错误。

今天在这里分享给大家希望遇到这个问题的能快些解决

using 语句中使用的类型必须可隐式转换为“System.IDisposable的更多相关文章

  1. using 语句中使用的类型必须可隐式转换为“System.IDisposable”

    在entity framework 中错误 using 语句中使用的类型必须可隐式转换为“System.IDisposable” 的错误. 原因是: 没有引用 EntityFramework 这个程序 ...

  2. 【.NET】using 语句中使用的类型必须可隐式转换为"System.IDisposable"

    #问题: 在使用EF开发中,出现如下错误:“using 语句中使用的类型必须可隐式转换为“System.IDisposable” #原因: 项目中没有引用 EntityFramework 这个程序集: ...

  3. 类型“DbContext”在未引用的程序集中定义。必须添加对程序及“EntityFramework,Version=6.0.0.0,Culture=neutral,PublicKeyToken=b77a5c561934e089”的引用。using语句中使用的类型必须可隐式转换为”System.IDisposable

    其他层引用Model层的ef模型时会发生这个错误 解决方法: 在你要使用EF模型的层下点击添加引用 然后点击浏览   找到Model层文件下的bin>debug文件   引用这两个dll文件 如 ...

  4. 在使用EF开发时候,遇到 using 语句中使用的类型必须可隐式转换为“System.IDisposable“ 这个问题。

    原因就是 这个程序集中没有引用EntityFramework.可以使用Nuget 安装EntityFramewok.

  5. 报错:无法将类型"System.Data.EntityState"隐式转换为"System.Data.Entity.EntityState"

    报错:无法将类型"System.Data.EntityState"隐式转换为"System.Data.Entity.EntityState".   出错语句停留 ...

  6. NHibernate无法将类型“System.Collections.Generic.IList<T>”隐式转换为“System.Collections.Generic.IList<IT>

    API有一个需要实现的抽象方法: public IList<IPermission> GetPermissions(); 需要注意的是IList<IPermission>这个泛 ...

  7. 无法将类型“System.Collections.Generic.List<anonymous type:string ClassID,string ClsssName>”隐式转换为“System.Collections.Generic.List<Ecology.Model.EnergyFlowGraph>”

    无法将类型“System.Collections.Generic.List<anonymous type:string ClassID,string ClsssName>”隐式转换为“Sy ...

  8. 错误 128 无法将类型“string”隐式转换为“System.Windows.Forms.DataGridViewTextBoxColumn”

    原因是DataGridView中列的Name属性值和DataPropertyName属性值一样,比如Name="CardID",DataPropertyName="Car ...

  9. MVC 无法将类型“System.Collections.Generic.List<AnonymousType#1>”隐式转换为“System.Collections.Generic.IList<Mvc3Modeltest.Models.Movie>”。存在一个显式转换(是否缺少强制转换?))

    1.问题: 2.解决方案:强制指定类型. 解决之.

随机推荐

  1. zepto的touch模块解决click延迟300ms问题以及点透问题的详解

    大家都知道移动端的click事件会延迟300ms触发,这时大家可以使用zepto的touch模块,里面定义了一个tap事件,通过绑定tap事件,可以实现点击立即触发的功能. 那么,它的tap事件是怎么 ...

  2. http://www.cnblogs.com/zhaoguihua/tag/%E9%AB%98%E6%80%A7%E8%83%BD%E7%BD%91%E7%AB%99/

    http://www.cnblogs.com/zhaoguihua/tag/%E9%AB%98%E6%80%A7%E8%83%BD%E7%BD%91%E7%AB%99/

  3. NodeJS 常用模块

    NodeJS 模块: n:NodeJS 版本管理/切换 参考: https://github.com/tj/n ExpressJS:Web 框架 参考: http://expressjs.com/ m ...

  4. 开启macbook win7触控屏右键

    开启macbook win7触控屏右键,如下图

  5. asp.net前台代码中引入namespace的方法

    <%@ import NameSpace="System.Data.OleDb" %>

  6. C语言深度挖掘

    二级指针和回调函数的用法: #include <stdio.h> #include <stdlib.h> int add(int num1 ,int num2){ return ...

  7. 高效Web开发的10个jQuery代码片段

    原文转载:http://www.codeceo.com/article/10-jquery-snippets-web-dev.html

  8. Data import/export of Netezza using external table

    Introduction External table is a special table in Netezza system, which could be  used to import/exp ...

  9. [转载]Matlab之静态文本多行输出

    转载文章,原文链接:Matlab中的静态文本框中显示多行内容 有时候,我们在GUI中利用静态文本框显示程序的结果,但是结果很长,一行未必可以显示的开,而静态文本框不像edit或listbox那样通过滚 ...

  10. code project 上的内存管理的示例代码

    /******************************************************************** created: 2014/03/17 18:53 file ...