欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页  >  IT编程

Ling to sql 多表查询,多个条件进行关联

程序员文章站 2022-05-03 15:05:58
使用多表查询进行关联时,提示 join子句中其中一个表达式的类型不正确,注意字段类型和名称要一致,否则join时提示语法错误,错误截图如下 ......

  使用多表查询进行关联时,提示 join子句中其中一个表达式的类型不正确,注意字段类型和名称要一致,否则join时提示语法错误,错误截图如下

var incomedetails = from a in _postgredbcontext.merchant_daily_income_detail
                                    join b in _postgredbcontext.merchant_daily_invoice on new { a.merchant_id, a.date.date } equals new { b.merchant_id, b.date.date } 
                                    select a  ;

Ling to sql 多表查询,多个条件进行关联