public IActionResult Delete([FromForm] string videoId) { VideoData[] videoArray = DisplayService.GetVideoData(); List <VideoData> videoList = videoArray.ToList(); VideoService.DeleteFile(videoList.First(x => x.Id == videoId)); videoList.Remove(videoList.First(x => x.Id == videoId)); VideoService.Upload(videoList.ToArray()); return(Redirect("/Videos")); }