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