public List <Employee> GetEmployeesByCompany(Company company) { if (company == null) { throw new ArgumentNullException(nameof(company)); } return(ExecuteFaultHandledOperation(() => { var employees = new List <Employee>(); var comp = new CompanyData() { CompanyKey = company.CompanyKey }; var emps_data = _entity_person_repo.GetAll(comp); foreach (EntityPersonData emp_data in emps_data) { Employee employee = _pers_es.Map(emp_data); employee.PersonAttributes = _entity_attrib_be.GetAttributeByEntity(employee.PersonKey, QIQOEntityType.Person); employee.Addresses = _address_be.GetAddressesByEntityID(employee.PersonKey, QIQOEntityType.Person); //employee.Companies = compHelper.GetCompaniesByEmployee(employee); // CAUSES Stack Overflow - of sorts HERE PersonData ent_per = _person_repo.GetByID(employee.PersonKey); //GetEmployeeSupervisor(employee); _pers_es.InitPersonData(employee, ent_per); //Log.Info("Employee: {0}; Role: {1}; Type: {2}; EntityPersonKey {3}", employee.PersonLastName, // employee.RoleInCompany, employee.CompanyRoleType, employee.EntityPersonKey); employees.Add(employee); } return employees; })); }
private List <Address> GetAddresses(int acct_key, QIQOEntityType type) { return(_address_be.GetAddressesByEntityID(acct_key, type)); }
public List <Address> GetAddressesByEntity(int entity_key, QIQOEntityType entity_type) { IAddressBusinessEngine address_be = _business_engine_factory.GetBusinessEngine <IAddressBusinessEngine>(); return(address_be.GetAddressesByEntityID(entity_key, entity_type)); }