public async Task<IEnumerable<GeneralKvPair<long, string>>> GetData(string tableName, int? id, string searchString)
        {
            var serviceRequest = new GetDataParam
            {
                Table = tableName,
                Id = id ?? 0,
                SearchTerm = searchString
            };

            var response = await Task.Factory.StartNew(() => Client.UserService.getData(serviceRequest, null)).ConfigureAwait(false);
            return response.Select(x => new GeneralKvPair<long, string>
            {
                Id = (long)x.Id,
                Value = x.Name
            });
        }
 public void send_getData(GetDataParam getDataParam, Session session)
 #endif
 {
   oprot_.WriteMessageBegin(new TMessage("getData", TMessageType.Call, seqid_));
   getData_args args = new getData_args();
   args.GetDataParam = getDataParam;
   args.Session = session;
   args.Write(oprot_);
   oprot_.WriteMessageEnd();
   #if SILVERLIGHT
   return oprot_.Transport.BeginFlush(callback, state);
   #else
   oprot_.Transport.Flush();
   #endif
 }
 public IAsyncResult send_getData(AsyncCallback callback, object state, GetDataParam getDataParam, Session session)
      public List<GetDataResponse> getData(GetDataParam getDataParam, Session session)
      {
        #if !SILVERLIGHT
        send_getData(getDataParam, session);
        return recv_getData();

        #else
        var asyncResult = Begin_getData(null, null, getDataParam, session);
        return End_getData(asyncResult);

        #endif
      }
 public IAsyncResult Begin_getData(AsyncCallback callback, object state, GetDataParam getDataParam, Session session)
 {
   return send_getData(callback, state, getDataParam, session);
 }
 public void Read (TProtocol iprot)
 {
   TField field;
   iprot.ReadStructBegin();
   while (true)
   {
     field = iprot.ReadFieldBegin();
     if (field.Type == TType.Stop) { 
       break;
     }
     switch (field.ID)
     {
       case 1:
         if (field.Type == TType.Struct) {
           GetDataParam = new GetDataParam();
           GetDataParam.Read(iprot);
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       case 2:
         if (field.Type == TType.Struct) {
           Session = new Session();
           Session.Read(iprot);
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       default: 
         TProtocolUtil.Skip(iprot, field.Type);
         break;
     }
     iprot.ReadFieldEnd();
   }
   iprot.ReadStructEnd();
 }