Hi, I'm new to ASP.NET, C# and the MVC framework but have managed to build a site that works pretty well.
Now I am trying to create a reporting section for the site to display a table of information on all users and just can't get my head around creating custom model classes for the joined table data. I have seen lots of examples with one record but none with a full data set.
I am using the Entity framework and pulling my data out with:
var usersInfo = from c in _dataModel.UserProfile select new { c.Forname, c.Surname, c.aspnet_Users.UserName, c.Countries.CountryName, c.Specialities.SpecialityName};
The data returns fine, but it is of the type: 'System.Data.Objects.ObjectQuery
1[<>f__AnonymousType65[System.String,System.String,System.String,System.String,System.String]]'
How would I get this into a type that I can pass back to a strongly typed View?
Thanks,
Giles