public async void PopulateList() { //TODO: Lägg till users i divisions med For-loop var divisions = await _divisionRepository.GetAll(); DivisionList = new ObservableCollection <DivisionModel>(divisions.Select(x => x.MapToModel())); foreach (var div in DivisionList) { var users = await _userRepository.GetAll(div.DivisionId); div.Users = users.Select(x => x.MapToModel()).ToList(); } }
public IList <Division> GetAll() { return(_repository.GetAll()); }
public IEnumerable <Division> GetAllDivision() { return(divisionRepository.GetAll()); }
public IEnumerable <Division> GetAll() { var entities = repository.GetAll(); return(entities); }