I'm trying to update a child collection (MVC3 and Entity Framework 4) I cant get any updates to get persisted.
[HttpPost]
public ActionResult Edit(Subject EditedSubject, IEnumerable<SubjectTagPin> SubjectTagPins)
{
try
{
XDataModelContainer model = new XDataModelContainer();
model.Subjects.Attach(EditedSubject);
model.SaveChanges();
return RedirectToAction("Index");
}
catch
{
return View(EditedSubject);
}
}