如何在LINQ中对单个联接中的多个字段进行联接
var result = from x in entity join y in entity2 on x.field1 = y.field1 and x.field2 = y.field2
编辑
var result = from x in entity join y in entity2 on new { x.field1, x.field2 } equals new { y.field1, y.field2 }
如何在LINQ中对单个联接中的多个字段进行联接 编辑var result = from x in entity
join y in entity2
on x.field1 = y.field1
and
x.field2 = y.field2
var result = from x in entity
join y in entity2
on new { x.field1, x.field2 } equals new { y.field1, y.field2 }
隔江千里
慕容3067478
相关分类