public ActionResult Add() { var vm = new SlideVM(); vm.WebSite = CurrentWebsite; return(View(vm)); }
public ActionResult Edit(SlideVM vm) { if (ModelState.IsValid) { Mapper.Initialize(c => c.CreateMap <SlideVM, SlideDTO>()); var slideDto = Mapper.Map <SlideVM, SlideDTO>(vm); OperationDetails op = _sliderService.EditSlide(slideDto); return(Json(new { Succedeed = op.Succedeed, message = op.Message })); } return(View(vm)); }