public async Task <List <Person> > SearchPersonAsync(string searchText) { var repositorySearchResult = await _dataService.SearchPersonsAsync(searchText); var result = new List <Person>(); foreach (var personDto in repositorySearchResult) { result.Add(PersonExtension.PersonFromDto(personDto)); } return(result); }
public async Task <Person> GetPersonAsync(int id) { return(PersonExtension.PersonFromDto(await _dataService.GetPersonAsync(id))); }