Hello there..
Hierarchy structure of my entities looks like this:
Company -> Department -> Employee
Is it possible to fetch all this in one fetch ?
So far I comed up with this:
DataAccessAdapter adapter = new DataAccessAdapter();
var company = new CompanyEntity(1);
IPrefetchPath2 prefetchPath = new PrefetchPath2(EntityType.CompanyEntity);
prefetchPath.Add(CompanyEntity.PrefetchPathDepartment);
adapter.FetchEntity(company, prefetchPath);
var department = company.Department.FirstOrDefault(x => x.Id == 16);
IPrefetchPath2 prefetchPath2 = new PrefetchPath2(EntityType.DepartmentEntity);
prefetchPath2.Add(DepartmentEntity.PrefetchPathEmployee);
adapter.FetchEntity(department, prefetchPath2);
Or is there any more convenient way to achieve the same result?