The C1 Data layer will return "a flat structure" consisting of simple fields (string, int, guid etc) and not an object structure.
You need to do join with the Airline type, something like this:
You need to do join with the Airline type, something like this:
var myList = from tour in Data.Get<Countries.Tour>()
join airline in Data.Get<Countries.Airline>() on tour.Airline equals airline.Id
select new { airline.Name, tour.Thumb};
@foreach (var element in myList)
{
@element.Name
<img src='~/media(@element.Thumb)' />
}
See http://stackoverflow.com/questions/37324/what-is-the-syntax-for-an-inner-join-in-linq-to-sql