예제 #1
0
        private static String[] getContactsByExtIDTest(String[] tk)
        {
            FloadingDataContext context = new FloadingDataContext();
            var tmpList = from z in context.Contact
                          select z;
            List <StorageManager.Pair <String, int> > UserAndServiceID = new List <StorageManager.Pair <String, int> >();

            foreach (Contact c in tmpList)
            {
                UserAndServiceID.Add(new StorageManager.Pair <String, int> {
                    First = c.externalUserID, Second = c.externalServiceID
                });
            }

            List <Contact> outTest = sm.getContactsByExtID(UserAndServiceID);

            Console.WriteLine("contactID externalServiceID\texternalUserID\t\t\t\tnameContact\n");
            return(outTest.Select(c => c.contactID + "\t\t" + c.externalServiceID + "\t\t" + c.externalUserID + "\t\t\t\t\t" + c.nameContact).ToArray());
        }