开发者

ADO.NET Entity Data Model - MVC - managing one-to-many relations

Let's say that I have following situation.

I have many customers and many consultans, and each customer has attached only one consultant. So it's one-to-many relationship.

I created Edit view which display customer_name and customer_consultant_id how should I update information after post? Just UpdateModel does not work, so something more开发者_StackOverflow社区 is needed. Any ideas?


To get the data from your web page to the controller, have a look at this article from Scott Hanselman:

ASP.NET Wire Format for Model Binding to Arrays, Lists, Collections, Dictionaries


Those following two links seems to be completly answering my question:

ASP.NET MVC, Entity Framework, One-to-Many and Many-to-Many INSERTS

ASP.NET MVC, Entity Framework, Modifying One-to-Many and Many-to-Many Relationships

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜