public async Task<ActionResult> Edit(EncuestaTemplateViewModel model) { if (ModelState.IsValid) { await this.encuestaTemplatesService.CreateOrUpdateAsync(model); return this.RedirectToAction("Index", "Templates"); } // If we got this far, something failed, redisplay form return this.View(model); }
public ActionResult Create() { var model = new EncuestaTemplateViewModel { Habilitado = true }; return this.View(model); }