public ActionResult New(ClassificationSystemPrimaryKey classificationSystemPrimaryKey, EditViewModel viewModel) { var classificationSystem = classificationSystemPrimaryKey.EntityObject; if (!ModelState.IsValid) { return(ViewEdit(viewModel, classificationSystem)); } var classification = new Classification(string.Empty, "#BBBBBB", viewModel.DisplayName, classificationSystem.ClassificationSystemID); viewModel.UpdateModel(classification, CurrentFirmaSession, HttpRequestStorage.DatabaseEntities); HttpRequestStorage.DatabaseEntities.AllClassifications.Add(classification); HttpRequestStorage.DatabaseEntities.SaveChanges(); SetMessageForDisplay( $"New {classificationSystem.ClassificationSystemName} {classification.GetDisplayNameAsUrl()} successfully created!"); return(new ModalDialogFormJsonResult()); }