I have these 3 classes:
public class Product
{
public int ProductId { get; set; }
public int ClassId { get; set; }
public string Name { get; set; }
public virtual Class Class { get; set; }
}
public class Partner
{
public int PartnerId { get; set; }
public int ClassId { get; set; }
public string Name { get; set; }
public virtual Class Class { get; set; }
}
public class Price
{
public int PriceId { get; set; }
public int ClassId { get; set; }
public int ProductId { get; set; }
public int PartnerId { get; set; }
public float Cost { get; set; }
}
and I have 3 lists of data:
List<Product> products; List<Partner> partners; List<Price> prices;
How can I show partners in top row, products in left column and price (if it is available for each partner and product) in cells of table in MVC View?