I need data from 2 different databases. I have tried the following
var User = (from U in _db.TblUsers
where U.IsAdmin == false
select U).ToList();
var AspNewsUser = (from A in _dbAspNet.aspnet_Users
select A).ToList();
var result = (from U in User
join A in AspNewsUser
on U.UserID equals A.UserId
select U);
But I get the following error message
The type of one of the expressions in the join clause is incorrect.
Type inference failed in the call to ‘Join’.
As you can see in the table schema of aspnet_Users,
Useridis auniqueidentifier(maps to GUID in entity framework). I bet thatTblUsers.UserIDhas a different type (likeint).