public ActionResult UpdateVideoGame(VideoGame videoGame) { var allCategory = _categoryService.GetAllByMainCategoryId(3); // 1 = Movie 2= Series 3= VideoGames 4=Book List <SelectListItem> category = (from i in allCategory select new SelectListItem { Value = i.Id.ToString(), Text = i.Name }).ToList(); ViewBag.Category = category; VideoGame updatedVideoGame = new VideoGame(); updatedVideoGame.Id = videoGame.Id; updatedVideoGame.VideoGameName = videoGame.VideoGameName; updatedVideoGame.VideoGameDescription = videoGame.VideoGameDescription; updatedVideoGame.CategoryId = videoGame.CategoryId; updatedVideoGame.IMDBScore = videoGame.IMDBScore; updatedVideoGame.ReleaseDate = videoGame.ReleaseDate; updatedVideoGame.VideoURL = videoGame.VideoURL; updatedVideoGame.CreatedDate = videoGame.CreatedDate; if (Request.Files[0].ContentLength > 0) { updatedVideoGame.ImageURL = FileHelper.Add(Request.Files[0], "VideoGame"); } else { updatedVideoGame.ImageURL = TempData["ImageURL"].ToString(); } _videoGameService.Update(updatedVideoGame); TempData["UpdatedMessage"] = "Kayıt Güncellendi"; return(RedirectToAction("VideoGameList")); }