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"); }
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"); }