public ActionResult Create(TEditModel model) { var entity = new TEntity(); EditEntityModelMapper.MergeEntityWithModel(entity, model); Repository.Add(entity); return(RedirectToAction("Details", new { id = entity.Id })); }
private ActionResult SaveExistingEntity(TEditModel model, TEntity existingEntity) { EditEntityModelMapper.MergeEntityWithModel(existingEntity, model); Repository.NotifyItemWasChanged(existingEntity); return(RedirectToAction("Details", new { id = existingEntity.Id })); }