Пример #1
0
        private void DoWork()
        {
            List <Task> tasks = new List <Task>();

            lock (this)
            {
                var repos = repositories.GetAll();
                foreach (var repo in repos)
                {
                    tasks.Add(indexer.AddRepository(repo));
                }
                Task.WaitAll(tasks.ToArray());
            }
        }
Пример #2
0
        public FeedbackViewModel GetFeedbacks()
        {
            var comments = _feedbackRepository.GetAll();

            var feedbackView = new FeedbackViewModel()
            {
                Comments = new List <string>()
            };

            foreach (var item in comments)
            {
                feedbackView.Comments.Add(item.Coment);
            }

            return(feedbackView);
        }
Пример #3
0
        public NameViewModel GetAllNames()
        {
            var names = _nameRepository.GetAll();

            var nameViewModel = new NameViewModel()
            {
                Names = new List <string>()
            };


            foreach (var item in names)
            {
                nameViewModel.Names.Add(item.MyName);
            }

            return(nameViewModel);
        }
Пример #4
0
 public IEnumerable <Books> GetAll()
 {
     return(repos.GetAll());
 }
Пример #5
0
 public IEnumerable <Users> GetAll()
 {
     return(repos.GetAll());
 }
Пример #6
0
 public IEnumerable <Movie> GetMovies()
 {
     return(_repo.GetAll().AsQueryable().Include(l => l.Locations).ThenInclude(l => l.Location));
 }
Пример #7
0
 public async Task <IEnumerable <TEntity> > GetAll() => await _repo.GetAll();
Пример #8
0
 public IEnumerable <Location> GetLocations()
 {
     return(_repo.GetAll().AsQueryable().Include(m => m.Movies).ThenInclude(m => m.Movie));
 }
Пример #9
0
 public IEnumerable <Package> GetAll()
 {
     return(repositories.GetAll().SelectMany(x => x.packages));
 }