There is two table in one table column is FID.. FID is in table 'tblRe '
and type in db is string and in other table column is MID .. MID is in table 'tblVeh'
and type in db is int both values are same but names are different . i try to adjust but this shows error
string data = "[";
var re = (from veh in DB.tblVeh
join regh in DB.tblRe on
new{MID=veh .MID} equals new {MID=tblRe .FID}
where !(veh .VName == "")
group veh by veh .VName into g
select new
{
Name = g.Key,
cnt = g.Select(t => t.Name).Count()
}).ToList();
data += re.ToList().Select(x => "['" + x.Name + "'," + x.cnt + "]")
.Aggregate((a, b) => a + "," + b);
data += "]";
i try this
new{MID=veh .MID} equals new {MID=tblRe .FID}
error
The type of one of the expressions in the join clause is incorrect. Type inference failed in the call to 'Join'.
any solution