var q = db.foodcategories.First(fc => fc.Id == categoryId);var q_a = from qq in q.foods join p in db.pictures on qq.Id equals p.FoodId 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, foodCategories = qq.foodcategories.Select(fc => new FCategoryModel { Name = fc.Name }).AsQueryable() };
var q = db.foodcategories.First(fc => fc.Id == categoryId);var q_a = from qq in q.foods join p in db.pictures on qq.Id equals p.FoodId 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, foodCategories = qq.foodcategories.Select(fc => new FCategoryModel { Name = fc.Name }).AsQueryable() };