Exemple #1
0
        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();
            }
        }
Exemple #2
0
 public IList <Division> GetAll()
 {
     return(_repository.GetAll());
 }
 public IEnumerable <Division> GetAllDivision()
 {
     return(divisionRepository.GetAll());
 }
Exemple #4
0
        public IEnumerable <Division> GetAll()
        {
            var entities = repository.GetAll();

            return(entities);
        }