public static ICollection <AccountBase> GetAccountsSetAsPrimaryContact(Guid ContactId, CRMOntology_StagingEntities Context)
 {
     return((from account in Context.AccountBases
             where account.PrimaryContactId == ContactId
             select account).ToList <AccountBase>());
 }
 public static ICollection <ContactBase> GetChildContacts(int ObjectTypeCode, Guid ObjectId, CRMOntology_StagingEntities Context)
 {
     return((from contact in Context.ContactBases
             where contact.ParentCustomerId == ObjectId && contact.ParentCustomerIdType == ObjectTypeCode
             select contact).ToList <ContactBase>());
 }