asp.net mvc 3 view for ef4 join
how can i display a join fro开发者_StackOverflow社区m a entity framework model and then show it in an asp.net mvc 3 view? The join is then based on more than 1 model?
Create a custom view model that will hold the contents of your EF join.
you can have a view model with all the properties you want in the presentation level. It will include all the properties from all the related models. In entity framework side you can have several options.
You can have views, can map several tables for one entity, You need to give more information to give some idea about the best method. Need to know about the relationships you have in your models in EF which you are going to join.
精彩评论