0

i want to retrieve data from two table on a single view like price, name from one table and others details like product description from another table i m not getting how to do that

please help me with that ....

i m apply join query but it is not giving me the exact result

    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);
        }

    }
Richa
  • 41
  • 1
  • 6

1 Answers1

0

you can create a viewmodel fill it with required values and display.

check below

MVC - Passing multiple data tables to a view

Community
  • 1
  • 1
coder771
  • 368
  • 5
  • 17