/
Master-Child Child-to-Parent Query Example
Master-Child Child-to-Parent Query Example
Contact to Account
SalesforceSession salesforceSession = new SalesforceSession(new LoginDetails("username@example.com", "salesforcePassword")); ContactDataSource contactDataSource = new ContactDataSource(salesforceSession); List<Contact> contacts = contactDataSource.QueryEntities<Contact>( Contact.Fields.Id, Contact.Fields.FirstName, Contact.Fields.Account(Account.Fields.Id, Account.Fields.Name) ); foreach (Contact contact in contacts) { Account account = contact.Account; //get the related Account string accountName = account.Name; }