// GET: Videos public ActionResult Index(Int64 munitionID) { List <VideosPO> mappedVideos = new List <VideosPO>(); try { //Instantiating and mapping videos by munition ID List <VideosDO> videos = dataAccess.ViewVideos(munitionID); mappedVideos = VideosMapper.MapDOtoPO(videos); //Pass munitionID even if there aren't videos in table //if (videos.Count == 0) //{ // mappedVideos.Add(new VideosPO() { MunitionID = munitionID }); //} } catch (Exception ex) { } ViewBag.ID = munitionID; return(View(mappedVideos)); }