I've got a simple structure
Widget (parent table)
id (IDENTITY)
title
WidgetChild (child table) -
- id (foreign key to widget.id)
- content
On my View i have one field that captures the title, and another field that captures the content value.
<%= Html.TextBox("title") %>
and
<%= Html.TextBox("content") %>
How do i go about wiring up my controller to insert a new entry into Widget first and then insert an entry into WidgetChild? I'm not sure how to go about doing this.. do I pass a FormCollection instance, manually instantiate the Widget instance and pass in the values? Or can i use UpdateModel() somehow? I'm not familiar with how UpdateModel could bind my form values especially if they span multiple tables/classes.