Creating custom model using other models in ASP.NET MVC
Posted
by Soham Dasgupta
on Stack Overflow
See other posts from Stack Overflow
or by Soham Dasgupta
Published on 2010-05-28T17:08:03Z
Indexed on
2010/05/28
17:12 UTC
Read the original article
Hit count: 210
asp.net-mvc
As the title suggests I have two models Products And Orders which are actually two table in my database and I have used a LINQ to SQL class to create there models. Now I wan to create a model named "OrderDetails" which will have properties from both the model like product name and id from product and Order number from orders something like this. An then I want to create a view from this custom model and from which I want to add "CRUD" operation. What should be my approach. And in many scenarios I may have to use data from more than 4 models. Please help. I'm wondering helplessly and I have only two days experience in ASP.NET MVC.
© Stack Overflow or respective owner