public ActionResult Edit(int id) { var viewModel = new CreateDerLayoutViewModel(); var response = _derService.GetDerLayout(id); viewModel.Id = response.Id; viewModel.Title = response.Title; viewModel.IsActive = response.IsActive; return(View(viewModel)); }
public ActionResult Preview(string secretNumber) { //if (DerImageController.SecretNumber != secretNumber) { // return HttpNotFound(); //} var activeDer = _derService.GetActiveDer(); var id = activeDer.Id; var response = _derService.GetDerLayout(id); var viewModel = response.MapTo <DerDisplayViewModel>(); return(View("Preview2", viewModel)); //return View("~/Views/Der/Preview2.cshtml",viewModel); }