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

  使用多表查询进行关联时,提示 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  ;

posted @ 2019-09-16 11:46  低调码农哥!  阅读(2754)  评论(0编辑  收藏  举报