6
我已经看过各种计算器的答案,但我没有看到用linq修复我的连接的方式。Linq查询类型推断失败,在加入调用
2表
var query = from tips in TblTips
where tips.Id == 30
join files in TblFiles on tips.Id equals files.Group
select new { tips, files };
错误:
Type inference failed in the call to Join
现在tips.Id是int,而files.Group是一个varchar
我试图做.value的
tips.id.Value --> the word Value not working (most recent linqpad)
(int)files.Group --> it doesn't like that ...
我认为如果'files.Group''可以是一个整数以外的东西,''tips.Id.ToString()等于files.Group''实际上会更安全。 – kmc059000
好吧,这个工程,我曾尝试做一个Int32.Parse,并给了我一个不同的错误。谢谢! –