C#: from in select ; m(linq where)
2014-06-25 11:19
337 查看
B_Apply public List<Apply> RiskLink(Expression<Func<Apply, bool>> where) { using (var dbContext = new DBContext()) { var query = dbContext.ApplyDs.Include(m => m.User).Where(where); return query.ToList(); } } public ActionResult RiskLinkDetail01(string name,string idcard) { List<Apply> listApply = new B_Apply().RiskLink(m => m.User.Name == name && m.Account.IDCard == idcard); var result = from item in listApply select new { ApplyTime = item.ApplyTime.ToString("yyyy-MM-dd HH:mm:ss"), Amounts = item.Amounts }; return Json(new { total = listApply.Count, rows = result }); }
相关文章推荐
- C# LINQ 详解 From Where Select
- LINQ To Entities如何实现查询 select * from tableA where id in (1,2,3,4) ?
- LINQ中in的实现方法-LINQ To Entities如何实现查询 select * from tableA where id in (1,2,3,4)
- C# Array 中的 Linq 方法 Where Count Select
- mysql select *... where id in (select 字符串 from ... )查询结果问题?
- SELECT * FROM p_newsbase where cid in (1,2,6,7,11,) limit 0, 20php100第68讲视频教程(编辑新闻系统)编写代码遇到问题
- 解决 Select * from TableName where ID in (@ids) 问题
- sql server 每日一记之 with as delete from where in (select)
- 共享锁select * from t1 where id=2 LOCK IN SHARE MODE;
- select * from dbo.sysobjects where type not in('S','D','K')
- Linq之详解 From Where Select Group Into OrderBy Let Join
- select * from user where name in (select name from user group by name having count(*) > 1)
- c# from where select
- sql Split函数(WHERE RouterID IN (SELECT Item FROM dbo.Split(@routerIds,',')))
- 常用语句(四)select top ... ... from ... where ... not in(select top ... ... from ...)、AVG()
- 在游标中如何实现Select * from AAA where BB in XXX
- LINQ的经典例子-Where,Select、SelectMany、SkipWhile子句中使用数组索引
- [转] LINQ的经典例子-Where,Select、SelectMany、SkipWhile子句中使用数组索引。
- LINQ的经典例子-Where,Select、SelectMany、SkipWhile子句中使用数组索引
- strSQL = "Select * From " & strTableName & " Where False "