예제 #1
0
        public IActionResult AddRocket(ShopRocketViewModel model)
        {
            var rocket = _mapper.Map <Rocket>(model);

            _shopRocketRepository.Save(rocket);
            return(View());
        }
예제 #2
0
 public void SaveRocket(ShopRocketViewModel model)
 {
     if (model.Count >= 0 && model.Cost > 0)
     {
         var rocket = _mapper.Map <Rocket>(model);
         _shopRocketRepository.Save(rocket);
     }
 }