public IActionResult Create(StyleFormViewModel model)
        {
            if (!ModelState.IsValid)
            {
                return(View(model));
            }

            this.styles.Create(model.Name);

            this.TempData.AddSuccessMessage(string.Format(SuccessfullAdd, model.Name));

            return(RedirectToAction(nameof(All)));
        }
        public IActionResult Edit(int id, StyleFormViewModel model)
        {
            if (!ModelState.IsValid)
            {
                return(View(model));
            }

            var success = this.styles.Edit(id, model.Name);

            if (!success)
            {
                return(BadRequest());
            }

            this.TempData.AddWarningMessage(string.Format(SuccessfullEdit, model.Name));

            return(RedirectToAction(nameof(All)));
        }