コード例 #1
0
ファイル: Service.cs プロジェクト: Danrichart/DiabetesTracker
        public void InputCarbohydratesData(CarbViewModel model)
        {
            InputModel dataMappedModel = Mapper.Map <CarbViewModel, InputModel>(model);

            dataMappedModel.user = _user;
            AddModel(dataMappedModel);
        }
コード例 #2
0
 public ActionResult Carbs(CarbViewModel model)
 {
     if (ModelState.IsValid)
     {
         service.InputCarbohydratesData(model);
         return(RedirectToAction("Index", "Input"));
     }
     return(View(model));
 }