コード例 #1
0
 public ActionResult Edit(ITriggerInputModel inputModel)
 {
     ITrigger triggerToUpdate = _mappingEngine.Map<ITriggerInputModel, ITrigger>(inputModel);
     if (!ModelState.IsValid) return EditView(triggerToUpdate);
     _triggerService.UpdateTrigger(GetCurrentAuthKey(), triggerToUpdate);
     return RedirectToAction("Index");
 }
コード例 #2
0
 public ActionResult Create(ITriggerInputModel triggerInputModel)
 {
     ITrigger triggerToCreate = _mappingEngine.Map<ITriggerInputModel, ITrigger>(triggerInputModel);
     if (!ModelState.IsValid) return CreateView(triggerToCreate);
     _triggerService.AddTrigger(GetCurrentAuthKey(), triggerToCreate);
     return RedirectToAction("Index");
 }