我有这段代码:
int se = (int) settings.GruppoSegreteria;
var acc = db.USR_Accounts.Where( p => p.ID_Gruppo == se);
var segreterie = from s in db.USR_Utenti
join h in acc on s.ID equals h.USR_UtentiReference
select s;
这个错误:
The type of one of the expressions in the join clause is incorrect. Type inference failed in the call to 'Join'
我不明白。 你能救我吗?
感谢
答案 0 :(得分:2)
您正加入s.ID
和h.USR_UtentiReference
。我猜他们不是同一类型?你必须加入两个整数(例如)。你不能加入int和其他类型。