我想从单个视图中的两个表中检索数据,例如价格,一个表中的名称以及其他详细信息,例如另一个表中的产品描述,我没有得到如何做到这一点
请帮助我......
我申请加入查询,但它没有给我确切的结果
public ActionResult ItineraryPackage(int id)
{
using (travelAndTourismEntities objentity = new travelAndTourismEntities())
{
ItineraryPage details = new ItineraryPage();
//PackageGallery = from o in objentity.tblItineraries where (o.Imageid == id) select o;
// tblItinerary = from p in objentity.PackageGalleries where(p.Imageid == id) select p;
var pagedetail = (from p in objentity.PackageGalleries join pc in objentity.tblItineraries on p.Imageid equals pc.Imageid
return View(pagedetail);
}
}