1、var list = from category in context.category join commodity in context.commodity on category.id equals commodity. categoryID where category.id>12 orderby category.id descending
select new model{
a=category.name,
b=commodity.name
}
2、var list=context.category.where<category>(c=>context.commodity.select(commodity=>commodity.. categoryID).contain(c.id)).select new{
a=category.name,
b=commodity.name
}
3、var list= from a in context.a where new int[]{1,2,3,4}.contains(a.id) select a;