I have a friend and I have problems with LINQ
We are trying to map a zipcode where the country name is found with a foreign key in the zipcode table.
our LINQ call is as follows
var Zipcodes = from p in db.Zipcodes
join i in db.ISOes on p.Iso_id equals i.ID
select new { Zip = p.Zip, name = p.Name, Address = p.Address, Country = i.Country };
return View(Zipcodes.ToList());
We can display the Zipcode table with a foreign key showing its own value, but try to use this value to display the name of the country instead (which is in the ISOes table)
We get the value cannot be null error (paraname = outer)
LINQ is a new technology for us, so any help would be greatly appreciated.
Thanks in advance!
OBS:
We redo some of the code and get stuck in what we think is another problem. we are going to make a new message about it. Sorry for the time spent, although we learned a lot :)