在使用 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. 针对bootstrap内联单选框input与文字不能居中对齐的解决办法

    1.html代码 <div > <label class="checkbox-inline first-label"> <input type=&qu ...

  2. 安装XMind

    XMind是一款思维导图软件.可编辑整理头脑中的想法,以使其脉络更加清晰. 在学习知识过程中,用这个工具也不错. 官方网站:  http://www.xmind.net 其它版本: http://ww ...

  3. 平板上的js和电脑上js的不同之处

    一.事件 1.平板上没有:onmousedown,onmouseup,onmousemove等事件,由ontouchstart,ontouchmove,ontounchend替代 2.位置问题:平板上 ...

  4. mybatis, spring, springmvc

    mybatis配置: mybatis-config.xml <configuration> <!-- 作者MyBatis博客: http://legend2011.blog.51ct ...

  5. What is “:-!!” in C code?

    stackoverflow上看到的这个问题,觉得挺有趣,顺手记下来. 楼主提问: I bumped into this strange macro code in /usr/include/linux ...

  6. sql server 数据遍历插入表变量

    )) DECLARE @str VARCHAR(MAX) ,) ,@start INT ,@end INT ,) SET @str = '1,2,3,4,5,6,7,8' SET @split = ' ...

  7. 三、HTTP抓包测试

    package testHTTP; import java.io.BufferedReader;import java.io.IOException;import java.io.InputStrea ...

  8. C++STL学习笔记_(1)vector知识

    #include<iostream> using namespace std; #include "vector" //数组元素的 添加和删除 void main31( ...

  9. oracle去掉重复记录语句

    oracle去掉重复记录语句   比如现在有一人员表 (表名:peosons) 若想将姓名.身份证号.住址这三个字段完全相同的记录查询出来 select p1.*   from persons  p1 ...

  10. 在xaf 14 中实现 Tonyyang原文中的action权限

    具体实现过程,主要修改了以下几个地方: 第一:角色和用户类中需要修改成SecurityStrategy的方式: 具体代码 MySecurityRole: using System; using Sys ...