C# ASP.NET Framework 4.5 を使用しています
これが私のテーブル構造です
public class Product{
public int ProductID { get; set; }
public string Name { get; set; }
public string Description { get; set; }
public virtual List<ProductVariants> ProductVariants { get; set; }
}
public class ProductVariants {
public int ProductVariantsID { get; set; }
public int ProductID { get; set; }
public string FrontImage { get; set; }
public string BackImage { get; set; }
public decimal Price { get; set; }
}
複数のページにデータを表示するのに適したLinqクエリは何ですか? 以下の形式でデータを表示したい。
製品 1、名前、説明
- 前面画像 1、背面画像 1、価格商品 2、名前、説明
- 前面画像 1、背面画像 1、価格- Front Image 2, Back Image 2, Price
商品 3、名前、説明
- 前面画像 1、背面画像 1、価格
助けてください !!!