CustomerService service = new CustomerService();
var customer = service.GetByCustomerId(customerId);
if (customer != null)
{
// 1
service.DeepLoad(customer, true, DeepLoadType.IncludeChildren, new Type[] { typeof(Company)});
if (customer.CompanyIdSource != null)
{
CompanyService cService = new CompanyService();
cService.DeepLoad(customer.CompanyIdSource, true, DeepLoadType.IncludeChildren, typeof(TaxStatus));
}
// 2
service.DeepLoad(customer, true, DeepLoadType.IncludeChildren, new Type[] { typeof(Company), typeof(TaxStatus) });
}
nettier deepload
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.