I have the following code:
ViewData.Model = from m in dataModel.Items
where m.Loaned == cust.MembershipID
&&
m.MediaItem1.Type != null
select new Temp
{
Rating = m.Library.ItemRating.Rating,
Title = m.MediaItem1.Title
};
and
public class Temp
{
public string Title { get; set; }
public int Rating { get; set; }
}
I create a view using Temp as being the strong type. This works well and displays all the titles and ratings as it should.
What I want to achieve now is the following: I have another type of Item which I want to query also, the query will look very similar to the one above, it will also return titles and ratings, but it is still classed as a different category of 'item'. How can I implement this so it will send both queries through to the View - if that makes sense?
Thanks.