日期:2014-05-20 浏览次数:21070 次
var q = db.foodcategories.First(fc => fc.Id == categoryId);
var q_a = from qq in q.foods
from p in db.pictures
//from qfc in q_fc
where p.FoodId==qq.Id
select new FoodModel
{
Id = qq.Id,
Name = qq.Name,
pictureUrl=p.Url,
Price = qq.Price,
Description = qq.Description,
MainIngredient = qq.MainIngredient,
MinorIngredient = qq.MinorIngredient,
Flavoring = qq.Flavoring,
Discount = qq.Discount,
Recommended = qq.Recommended