コード例 #1
0
 public ActionResult Video(int announcementApplicationId)
 {
     Storage storage = new Storage();
     var videoId = storage.Get(announcementApplicationId.ToString());
     var video = (new YoutubeConnector()).GetById(videoId);
     return View("Video", VideoModel.Create(video));
 }
コード例 #2
0
 public ActionResult Preview(string id, int announcementApplicationId)
 {
     var storage = new Storage();
     storage.Set(announcementApplicationId.ToString(), id);
     var connector = new YoutubeConnector();
     var video = connector.GetById(id);
     var model = VideoModel.Create(video);
     model.AnnouncementApplicationId = announcementApplicationId;
     return View("Preview", model);
 }