試行は次のとおりです。
var query1 = Db.ProductView.Where(w => w.DisplayFlag == "Y");
var paging = query1.Include(i => i.ProductImages).Select(s =>
new Products()
{
ProductCode = s.ProductCode,
DesignCode = s.DesignCode,
Code1 = s.Code1,
Code2 = s.Code2,
ProductImages = s.ProductImages.Where(i => (i.ImageNo == 1 & i.ImageType == "LS") ).Select(i => i),
ProductCoupons = Db.Database.SqlQuery<Coupon>("EXEC [USP_Front_EShop_Coupon_Select_By_ProductCode] @ProductCode", s.ProductCode)
}
);
ただし、次のエラーが返されました。
*LINQ to Entities はメソッド 'System.Collections.Generic.IEnumerable `1 [Lesmore1.Models.Coupon SqlQuery [Coupon] (System.String, System.Object [])' メソッドを認識せず、このメソッドを店舗表現。何が問題なのかを理解するのを手伝ってください..