Exemplo n.º 1
0
        public void InputCarbohydratesData(CarbViewModel model)
        {
            InputModel dataMappedModel = Mapper.Map <CarbViewModel, InputModel>(model);

            dataMappedModel.user = _user;
            AddModel(dataMappedModel);
        }
Exemplo n.º 2
0
 public ActionResult Carbs(CarbViewModel model)
 {
     if (ModelState.IsValid)
     {
         service.InputCarbohydratesData(model);
         return(RedirectToAction("Index", "Input"));
     }
     return(View(model));
 }