public IActionResult SaveItem(string Id = null) { VideosModel data = new VideosModel(); string ControllerName = this.ControllerContext.RouteData.Values["controller"].ToString(); int IdDC = Int32.Parse(MyModels.Decode(Id, API.Models.Settings.SecretId + ControllerName).ToString()); data.SearchData = new SearchVideos() { CurrentPage = 0, ItemsPerPage = 10, Keyword = "" }; data.ListItemsType = VideosService.GetListSelectItemsType(); if (IdDC == 0) { data.Item = new Videos(); } else { data.Item = VideosService.GetItem(IdDC, API.Models.Settings.SecretId + ControllerName); } return(View(data)); }