private async Task <IList <ListPerson> > GetPeopleDetail(IEnumerable <int> people) { var peopleList = new List <ListPerson>(); foreach (var personId in people) { var personDb = await _personRepository.FindPerson(personId); peopleList.Add(PersonUtils.CreateListPerson(personDb)); } return(peopleList); }
public async Task <IEnumerable <ListPerson> > GetList(Roles roles) { var peopleDb = await _personRepository.FindAllPeople(); var listPeople = new List <ListPerson>(); foreach (var personDb in peopleDb) { if (roles != Roles.General || personDb.Value.Dead) { listPeople.Add(PersonUtils.CreateListPerson(personDb.Value)); } } return(listPeople); }