> [HttpPost] > public ActionResult Save(EntryViewModel model) > { > if (!ModelState.IsValid) > { > // Handle error and display error result > model.ErrorDisplay.ShowError(model.ErrorDisplay.AddMessages(ModelState)) > return View("Show"); > } > > var entryBus = new busEntry(); > > // get entity that needs to be updated > var entry = entryBus.Entity; > entry.Id = model.entry.Id; > entry.Title = model.entry.Title; > entry.Description = model.entry.Description; > // ... more fields to map > > // Or you can attach the entity - in my bus object > // this is automatic, with EF you can use DbSet::Attach > //entryBus.Attach(model.entry); > > // Validate and save the bus object > if (!entryBus.Validate() || !entryBus.Save()) > { > model.ErrorDisplay.ShowError(model.ErrorDisplay.AddMessages(entryBus.ValidationErrors)); > return View("Show"); > } > > // Saved and done > return View("Index"); > } >>