there is two table in one table column in FID and type in db is string and in other table column is MID and type in db is int bother values are same but names are different . i try to adjust but this shows error
What I have tried:
Hide Copy Code
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 += "]";
error
Error 2 The type of one of the expressions in the join clause is incorrect. Type inference failed in the call to 'Join'.
any solution