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()); } }
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); }
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); }
public IEnumerable <Books> GetAll() { return(repos.GetAll()); }
public IEnumerable <Users> GetAll() { return(repos.GetAll()); }
public IEnumerable <Movie> GetMovies() { return(_repo.GetAll().AsQueryable().Include(l => l.Locations).ThenInclude(l => l.Location)); }
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)); }
public IEnumerable <Package> GetAll() { return(repositories.GetAll().SelectMany(x => x.packages)); }