public ActionResult Edit(int type, int id) { var c = _sliderService.FindByIdAsync(id).Result; var m = new SliderViewModel { Title = c.Title, TypeId = c.TypeId, Thumbnail = c.Thumbnail, Pic = c.Pic, Id = c.Id, State = c.State, Link = c.Link, PhotoFileName = c.Pic, SubTitle = c.SubTitle }; return(View(m)); }