MVC .Net create model and related models at same time
I have a model called Company and company can have 1 or more directors. I want to be able to create any number of directors at the same time as creating a company. I made the Create view of the of the Director a partial view: @using (Ajax.BeginForm("Create", "Director", new AjaxOptions { HttpMethod = "POST", UpdateTargetId = "partial", InsertionMode = InsertionMode.InsertAfter })) { @Html.EditorFor(model => model.Title) ... } On the Create view of the Company I have a button which loads the partial Create view of the Director into a container: $.get('@(Url.Action("Create", "Director"))',