public async Task <IEnumerable <Person> > GetMany() { using (var handler = new PersonsRestClientHandler()) { var persons = await handler.GetManyAsync(); return(persons); } }
public async Task <Person> GetById(string id) { using (var handler = new PersonsRestClientHandler()) { var person = await handler.GetByIdAsync(id); if (person == null) { throw new HttpResponseException(HttpStatusCode.NotFound); } return(person); } }