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