Head.SmackOnTable();

Contains Nuts.

Deeploading with NetTiers

without comments

Once you get your head around the DeepLoading and Inclusive/Exclusive Lists in NetTiers, its not too hard, but it isnt straightforward to start off with. Take this VERY simplified class, as an example:


class Product
{
public TList<Product> ChildrenProducts {get;set;}
public Product ParentProduct {get;set;}
}

If you want to deepload the ChildrenProducts collection, you think youd run the following:


DataRepository.ProductProvider.DeepLoad(product,true,DeepLoadType.IncludeChildren, new []{typeof(Product)});

But that will load the ParentProduct product, and not your ChildrenProducts collection, even though its just a list of Product.

What you want to do is:


DataRepository.ProductProvider.DeepLoad(product,true,DeepLoadType.IncludeChildren, new []{typeof(TList<Product>)});
Share and Enjoy: These icons link to social bookmarking sites where readers can share and discover new web pages.
  • DotNetKicks
  • DZone

Written by Monty

December 22nd, 2009 at 4:40 pm

Posted in .NET,NetTiers

Tagged with ,

Leave a Reply