public ActionResult Weight(WeightViewModel model) { if (ModelState.IsValid) { service.InputWeightData(model); return RedirectToAction("Index", "Input"); } return View(model); }
public void InputWeightData(WeightViewModel model) { InputModel dataMappedModel = Mapper.Map<WeightViewModel, InputModel>(model); dataMappedModel.user = _user; AddModel(dataMappedModel); }