求一个linq语句
我想用linq对EF实体article进行查询,查找article中articleid 不在12,23,23,26中的记录,按articleDt倒序 --------------------编程问答-------------------- var query = from a in articlelet exclude = new int[] { 12, 23, 23, 26 }
where !exclude.Contains(a.articleid)
orderby articleDt descending
select a; --------------------编程问答-------------------- var query = from a in article
let exclude = new int[] { 12, 23, 23, 26 }
where !exclude.Contains(a.articleid)
orderby articleDt descending
select a; --------------------编程问答-------------------- var query = from a in article
let exclude = new int[] { 12, 23, 23, 26 }
where !exclude.Contains(a.articleid)
orderby articleDt descending
select a; --------------------编程问答-------------------- var query = from a in article
let exclude = new int[] { 12, 23, 23, 26 }
where !exclude.Contains(a.articleid)
orderby articleDt descending
select a; --------------------编程问答--------------------
修改下
var query = from a in article
let exclude = new int[] { 12, 23, 23, 26 }
where !exclude.Contains(a.articleid)
orderby a.articleDt descending
select a; --------------------编程问答--------------------
objectList.Where(c => c.Identity != 14 && c.Identity != 13 && c.Identity != 19 && c.Identity != 23).OrderByDescending(c => c.Identity);
不在前五条的倒序
objectList.Where(c => objectList.Skip(5).Select(d=>d.Identity).Contains(!c.Identity)).OrderByDescending(c => c.Identity); --------------------编程问答--------------------
--------------------编程问答-------------------- var queryResult = (from a in db.Article
var queryResult = (from a in db.Article
where !(new int?[] { 14, 13,19,20 }).Contains(a.ArticleID)
orderby a.articleCreateDT descending
select a).Take(5);
where !(new int?[] { 14, 13,19,20 }).Contains(a.ArticleID)
orderby a.articleCreateDT descending
select a).Take(5);
补充:.NET技术 , LINQ