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  ;

猜你喜欢

转载自www.cnblogs.com/personblog/p/11526508.html