public ClassInitialization()
 {
     contactList = Soql.query <Contact>("SELECT ID FROM Contact LIMIT 1");
 }
Exemple #2
0
 public Database.QueryLocator queryLocator(Database.BatchableContext bc)
 {
     return(Database.getQueryLocator(Soql.query <Contact>("SELECT Id FROM Contact")));
 }
Exemple #3
0
        public static List <Contact> getContacts()
        {
            List <Contact> contacts = Soql.query <Contact>("SELECT Id, Email, Phone FROM Contact");

            return(contacts);
        }
Exemple #4
0
        public static List <Contact> getContactByEMail(string email)
        {
            List <Contact> contacts = Soql.query <Contact>("SELECT Id, Email, Phone FROM Contact WHERE Email = :email", email);

            return(contacts);
        }
Exemple #5
0
 public static void ForSoql()
 {
     foreach (Contact contactList in Soql.query <Contact>("SELECT Id, Name FROM Contact"))
     {
     }
 }
Exemple #6
0
 public static void OneVsListDemo()
 {
     List <Contact> contacts = Soql.query <Contact>("SELECT Id, Email FROM Contact LIMIT 5");
     List <Contact> contact  = Soql.query <Contact>("SELECT Id, Email FROM Contact LIMIT 1");
 }