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;

相关文章:

  • 2021-10-06
  • 2021-05-09
  • 2021-08-04
  • 2021-09-03
  • 2021-09-28
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-09-19
  • 2022-12-23
  • 2022-12-23
  • 2021-12-24
  • 2022-01-23
  • 2022-12-23
相关资源
相似解决方案