示例#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();
 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));
 }