public ActionResult Create(SizeCreateViewModel sizeCreateViewModel)
        {
            if (!ModelState.IsValid)
            {
                return(View(sizeCreateViewModel));
            }

            _sizeService.Add(sizeCreateViewModel);

            return(RedirectToAction("Index"));
        }
Beispiel #2
0
 public void Add(SizeCreateViewModel sizeCreateViewModel)
 => _sizeRepository.Save(new Models.Size(sizeCreateViewModel));
Beispiel #3
0
 public Size(SizeCreateViewModel sizeCreateViewModel)
 {
     Number = sizeCreateViewModel.Number;
 }