コード例 #1
0
        public ActionResult Upload(Video video, HttpPostedFileBase file)
        {
            video.FileName = file.FileName;
            video.FileData = file.InputStream;
            video.AddedOn = DateTime.UtcNow;
            video.VideoStatusEnum = Shared.Enums.VideoStatus.Pending;

            var videoProcessor = new VideoProcessor(_repository);
            videoProcessor.SaveVideo(video);

            return RedirectToAction("Index");
        }
コード例 #2
0
 public ActionResult Delete(int videoID)
 {
     var videoProcessor = new VideoProcessor(_repository);
     videoProcessor.DeleteVideo(videoID);
     return RedirectToAction("Index");
 }