本文介绍了linq关节类型推断无法调用"join"错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有3个表User,TeamMember和Assessment,所有三个表都有user_id列,User通过userid与TeamMember链接,而TeamMember和Assessment与user_id(TeamMember)&评分者,已评分(评估)
i have 3 tables User, TeamMember and Assessment all three have the user_id column, User is linked to TeamMember by userid and TeamMember and Assessment are linked with user_id(TeamMember) & rater,rated(Assessment)
我正在尝试与此
from a in db.Assessments
join u in db.Team_Members on a.rated equals u.user_id
join u2 in db.Team_Members on a.rater equals u2.user_id
抛出此错误
知道发生了什么吗?
推荐答案
您需要确保a.rated
/u.user_id
和a.rater
/u2.user_id
是同一类型
You need to make sure a.rated
/ u.user_id
and a.rater
/ u2.user_id
are the same type
这篇关于linq关节类型推断无法调用"join"错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!