Click here to Skip to main content
12,064,498 members (64,195 online)
Rate this:
 
Please Sign up or sign in to vote.
See more: Linux MVC
Hi,
I want to retrive value from multiple table in mvc .
Posted 28-Nov-12 1:21am
Mithkr917
Comments
Richard MacCutchan 28-Nov-12 6:33am
   
Then you need to either do it, or explain what your problem is. We cannot see your coding or read your mind.
Rate this: bad
 
good
Please Sign up or sign in to vote.

Solution 1

There are two ways of doing it.

1. Do it through controller.
2. Create view model that contains object of multiple tables and use that view model wherever you need it.

hope it helps...

Sagar Solanki
  Permalink  
Rate this: bad
 
good
Please Sign up or sign in to vote.

Solution 2

Hai

1. You can create a View Model as mentioned in this reference Multiple Models in a View in ASP.NET MVC 4 / MVC 5[^]


2. You can use PartialView or PartialAction in your view to load the different model from the controller

you can also refer this link to view small examples on each http://stackoverflow.com/questions/5763631/multiple-models-in-a-single-view-c-mvc3[^]

Hope it helps
  Permalink  

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month


Advertise | Privacy | Mobile
Web01 | 2.8.160204.4 | Last Updated 13 Mar 2015
Copyright © CodeProject, 1999-2016
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100