Table of Contents

Class NHInitializer

Namespace
Breeze.Persistence.NH
Assembly
Breeze.Persistence.NH.dll

Forces NHibernate lazy proxies to load, so that expanded entities are present before the session closes and the results are serialized.

public class NHInitializer
Inheritance
NHInitializer
Inherited Members

Methods

InitializeList(IEnumerable, ExpandTypeMap)

Recursively forces loading of each NHibernate proxy in the tree that matches an entry in the map.

public static void InitializeList(IEnumerable list, ExpandTypeMap expandMap)

Parameters

list IEnumerable

Top-level collection of objects

expandMap ExpandTypeMap

Properties to initialize for each type

InitializeList(IEnumerable, IDictionary<Type, List<string>>, int)

Recursively forces loading of each NHibernate proxy in the tree that matches an entry in the map.

public static void InitializeList(IEnumerable list, IDictionary<Type, List<string>> map, int remainingDepth)

Parameters

list IEnumerable

Top-level collection of objects

map IDictionary<Type, List<string>>

Map of properties to initialize for each type

remainingDepth int

How deep to follow the tree; prevents infinite looping

InitializeList<T>(IEnumerable<T>, params string[])

Recursively forces loading of each NHibernate proxy in the tree that matches an entry in the map.

public static void InitializeList<T>(IEnumerable<T> list, params string[] expandPaths)

Parameters

list IEnumerable<T>

Top-level collection of objects

expandPaths string[]

Property paths to initialize, e.g. "OrderDetails/Product"

Type Parameters

T

InitializeWithCascade(object?, IDictionary<Type, List<string>>, int)

Recursively forces loading of each NHibernate proxy in the tree that matches an entry in the map.

public static void InitializeWithCascade(object? parent, IDictionary<Type, List<string>> map, int remainingDepth)

Parameters

parent object

Top-level object

map IDictionary<Type, List<string>>

Map of properties to initialize for each type

remainingDepth int

How deep to follow the tree; prevents infinite looping