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