Skip to content

Instantly share code, notes, and snippets.

@mgroves
Created January 18, 2011 04:51
Show Gist options
  • Select an option

  • Save mgroves/784003 to your computer and use it in GitHub Desktop.

Select an option

Save mgroves/784003 to your computer and use it in GitHub Desktop.
Lazy Loading 2
private IProductRepository _productRepository;
private IProductRepository ProductRepository
{
get
{
if(_productRepository == null)
{
_productRepository = ObjectFactory.GetInstance<IProductRepository>();
}
return _productRepository;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment