Ejemplo n.º 1
0
 public IEnumerable <Video> Videos()
 {
     using (var context = new VideoContext())
     {
         return(context.Videos);
     };
 }
Ejemplo n.º 2
0
 public IEnumerable <Video> GetUnprocessedVideos()
 {
     using (var context = new VideoContext())
     {
         return(context.Videos.Where(v => !v.IsProcessed).ToList());
     }
 }
Ejemplo n.º 3
0
 public IEnumerable <Video> GetUnprocessed()
 {
     using (var context = new VideoContext())
     {
         return(context.Videos.Where(x => !x.IsProcessed));
     }
 }
Ejemplo n.º 4
0
 public IEnumerable <Video> GetUnprocessedVideos()
 {
     using (var context = new VideoContext())
     {
         return((from video in context.Videos
                 where !video.IsProcessed
                 select video).ToList());
     }
 }
Ejemplo n.º 5
0
 public List <Video> GetUnprocessedVideos()
 {
     using (var context = new VideoContext())
     {
         var videos = (from video in context.Videos
                       where !video.IsProcessed
                       select video);
         return(videos.ToList());
     }
 }
Ejemplo n.º 6
0
 public IEnumerable <Video> GetUnProccessedVideo()
 {
     using (var context = new VideoContext())
     {
         var videos =
             (from video in context.Videos
              where !video.IsProcessed
              select video).ToList();
         return(videos);
     }
 }
        public IList <Video> ObterVideosNaoProcessados()
        {
            IList <Video> videos;

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

            return(videos);
        }
Ejemplo n.º 8
0
        public string GetUnprocessedVideosAsCsv()
        {
            var videoIds = new List <int>();

            using (var context = new VideoContext())
            {
                var videos = _videoRepository.GetUnprocessedVideos();

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

                return(String.Join(",", videoIds));
            }
        }
Ejemplo n.º 9
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);
            }
        }
Ejemplo n.º 10
0
        //[] => ""
        // [{},{},{},{}] => "1,2,3"
        public string GetUnprocessedVideosAsCsv()
        {
            var videoIds = new List <int>();

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

                //var videos = new VideoRepository().GetUnprocessedVideos();

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

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