hai I am writing Joins in Linq to entities . here i am using 3 tables . but i got error like "The type of one of the expressions in the join clause is incorrect. Type inference failed in the call to Join"
Here my Code is
from A in db.table1
join B in db.table2 on A.id equals B.pid
join C in db.table3 on B.id equals C.ris
where A.Bid == "7521"
select new { C.ID};


Lakshmanan Sethu SankaranarayanRank #124 · 17.7K reputationPosted Mar 4, 2014, 4:26 AM EST
VulpesRank #55 · 29.2K reputationPosted Mar 4, 2014, 4:33 AM EST
join C in db.table3 on B.pid equals C.ris
If that's not the answer, then what are the types of : A.id. B.pid, B.id and C.ris?
Jignesh TrivediRank #16 · 50.3K reputationPosted Mar 4, 2014, 6:14 PM EST
hi,
I think this due to type mismatch between column(property) used in join.
you have appropriate type cast in join
Please provide property information of the classes which are used in join.
dilipkumar regana75 reputationPosted Mar 4, 2014, 7:57 PM EST
VulpesRank #55 · 29.2K reputationPosted Mar 5, 2014, 12:32 AM EST