public partial class Users
{
public users()
{
this.advanced_property = new HashSet<advanced_property>();
this.secondary_property = new HashSet<secondary_property>();
}
public int id { get; set; }
public string qq { get; set; }
public string sex { get; set; }
public string ages { get; set; }
public string zodiac_signs { get; set; }
public string constellation { get; set; }
public string blood_type { get; set; }
public string location { get; set; }
public virtual ICollection<advanced_property> advanced_property { get; set; }
public virtual ICollection<secondary_property> secondary_property { get; set; }
}
public List<T> FindListByExpression(Expression<Func<T, bool>> where, string greedyLoad = "")
{
try
{
using (context = new qqMarketingEntities1())
{
var query = context.Set<T>();
if (!string.IsNullOrEmpty(greedyLoad))
{
List<string> greedyLoads = greedyLoad.Split(',').ToList();
foreach (var i in greedyLoads)
{
query.Include(i);
}
query.Where(where);
}
List<T> result = query.ToList<T>();
return result;
}
}
catch (Exception e)
{
throw e;
}
}
public List<Users> GetUsersByParam(List<string> qqList, string sex = "", string ages = "", string zodica = "", string constellation = "", string blood = "", string location = "", string greedyLoad = "")
{
var esp = DynamicLinqExpressions.True<users>();
esp.And(o => qqList.Contains(o.qq));
if (!string.IsNullOrEmpty(sex))
详细解决方案
使用 Include 后 仍然此 ObjectContext 实例已释放,不可再用于需要连接的操作
热度:453 发布时间:2016-05-01 23:42:40.0
相关解决方案
- Spring自动扫描 <context:componet-scan>和加了<context:include-filter>以后有什么区别
- 在<jsp:include>里边添加action路径
- 请问<jsp:include page="" flush="true"/> 不能解释执行的原因
- 奇怪的有关问题,include 源文件正常 #include 头文件出link异常,请高手解答一下
- VC2005求援!#include<fstream>
- c:\F\visualstudio2008中文版\VC\include\excpt.h(60) : error C2065:
- 怎么把头文件#include "h" 转成 #include <h>
- visual studio 10.0\vc\atlmfc\include\atlcore.h(111): error C3861:
- ObjectContext 实例已释放,不可再用于需要连接的操作。解决方案
- 为什么在DW8设计视图下<include file="">后 下面的table都看不见呢,该如何解决
- 在 ASP.NET 中怎么嵌入 HTML,实现类似 <jsp:include /> 的功能
- :如何样动态改变 include 文件
- Cannot open include file: 'ps_trace.h'的有关问题
- NS2中 #include <wireless-phy.h> 引发的有关问题
- 各位神仙同僚们 问一下,关于UML中关于类图描述里,include 和 extension都应该在哪种情况下使用,该怎么解决
- include 出问题
- [求助]include 命令传参中文问题
- 用jsp include *.html文件时,却不能正常显示中文
- 关于 struts2 <s:include 只加载一次问题
- 在vc里什么代替#include
- div中使用<include file="">出有关问题,求好心人帮助
- 请教页面有很多重复的地方改怎么处理?include
- ASP 中 include 嵌套如何避免的
- 关于<include virtual的有关问题,请问高人帮助
- JSP include 导入页面资料 导入html页面出现乱码的解决
- JSP include 处置IECSS不兼容
- <include file="md5.asp"> 当一页有这句话时解决方案
- <include file=的路径如何写,asp文件所在位置是c:\fff\news\aaa.asp,inc文件在c:\fff\system\inc\aaa.inc
- include 传递参数解决方案
- php include()字符串,并解析字符串的有关问题