Click here to Skip to main content
15,886,110 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi freinds

i have small question in mvc3

am using Entity framework with asp.net mvc3

i have two tables with foreignkey relation ship

in my view i want to display data from both the tables and view is binded to one model


plz suggest me....
Posted

1 solution

You should make a view model that will contain information from both tables. Basically you will create a class that you will map the 2 table data entities too. Then bind the View to the new view model and you will be able to display information from both tables. If you want an example I will need to see some of the code you have already.
 
Share this answer
 
v2

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



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900