public ClassInitialization() { contactList = Soql.query <Contact>("SELECT ID FROM Contact LIMIT 1"); }
public Database.QueryLocator queryLocator(Database.BatchableContext bc) { return(Database.getQueryLocator(Soql.query <Contact>("SELECT Id FROM Contact"))); }
public static List <Contact> getContacts() { List <Contact> contacts = Soql.query <Contact>("SELECT Id, Email, Phone FROM Contact"); return(contacts); }
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); }
public static void ForSoql() { foreach (Contact contactList in Soql.query <Contact>("SELECT Id, Name FROM Contact")) { } }
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"); }