You need to determine what exactly you want to choose from them.
You can change the latter:
var fullData = myCats.Join(myHouses, cat => cat.id, house => house.id, (cat, house) => new {cat, house})
which will make fullData IQueryable of an anonymous type that looks like this:
class anonymous { Cat cat, House house }
Equivalent in LINQy format:
from cat in myCats join house in myHouses on cat.id equals house.id select new {cat, house}
You can also indicate what you want to choose to avoid waste:
from cat in myCats join house in myHouses on cat.id equals house.id select new {cat.id, cat.name, house.address}
Jon hanna
source share