【发布时间】:2012-05-28 00:17:41
【问题描述】:
假设有一串以逗号分隔的文本值,如数组:
var excludelist ="apples,oranges,grapes,pears";
排除列表值可能来自对数据库中表的查询。
假设一个查询,我们想要返回所有行,除了那些名为 Fruit 的字段包含排除列表中的任何项目的行。
var qry = from s in context.Groceries.Where(s => s.Fruit(here is where we need to exclude the items??) join u in context.Users on s.Owner equals u.User_ID
有人可以提供指向 SQL 答案的示例链接吗?
【问题讨论】:
标签: c# model-view-controller linq-to-sql