public virtual IActionResult CreateSpecificationAttributeGroup(SpecificationAttributeGroupModel model, bool continueEditing) { if (!_permissionService.Authorize(StandardPermissionProvider.ManageAttributes)) { return(AccessDeniedView()); } if (ModelState.IsValid) { var specificationAttributeGroup = model.ToEntity <SpecificationAttributeGroup>(); _specificationAttributeService.InsertSpecificationAttributeGroup(specificationAttributeGroup); UpdateAttributeGroupLocales(specificationAttributeGroup, model); _customerActivityService.InsertActivity("AddNewSpecAttributeGroup", string.Format(_localizationService.GetResource("ActivityLog.AddNewSpecAttributeGroup"), specificationAttributeGroup.Name), specificationAttributeGroup); _notificationService.SuccessNotification(_localizationService.GetResource("Admin.Catalog.Attributes.SpecificationAttributes.SpecificationAttributeGroup.Added")); if (!continueEditing) { return(RedirectToAction("List")); } return(RedirectToAction("EditSpecificationAttributeGroup", new { id = specificationAttributeGroup.Id })); } model = _specificationAttributeModelFactory.PrepareSpecificationAttributeGroupModel(model, null, true); //if we got this far, something failed, redisplay form return(View(model)); }