/// <summary> /// Performs query operation for available <see cref="Interviewer"/>s asynchronously. /// Note that this sample does not return the result, although your real class will do so. /// </summary> public void QueryForInterviewersAsync() { // execute async call Task <IQueryable <Interviewer> > task = _interviewersService.QueryAsync(); // do some work here // ... // get async call result IEnumerable <Interviewer> allInterviewers = task.Result.ToList(); IEnumerable <Interviewer> interviewersWithValidTelephone = allInterviewers.Where(interviewer => !string.IsNullOrEmpty(interviewer.TelephoneNumber)).ToList(); }
/// <summary> /// A synchronous version of <see cref="INfieldInterviewersService.QueryAsync"/> /// </summary> public static IQueryable <Interviewer> Query(this INfieldInterviewersService interviewersService) { return(interviewersService.QueryAsync().Result); }