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