Beispiel #1
0
        public IEnumerable <Video> GetUnprocessedVideos()
        {
            using (var context = new VideoContext())
            {
                var videos =
                    (from video in context.Videos
                     where !video.IsProcessed
                     select video).ToList();

                return(videos);
            }
        }
Beispiel #2
0
        public string GetUnprocessedVideosAsCsv()
        {
            var videoIds = new List <int>();

            using (var context = new VideoContext())
            {
                var videos =
                    (from video in context.Videos
                     where !video.IsProcessed
                     select video).ToList();

                foreach (var v in videos)
                {
                    videoIds.Add(v.Id);
                }

                return(String.Join(",", videoIds));
            }
        }