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
listIEnumerableTop-level collection of objects
expandMapExpandTypeMapProperties 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
listIEnumerableTop-level collection of objects
mapIDictionary<Type, List<string>>Map of properties to initialize for each type
remainingDepthintHow 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
listIEnumerable<T>Top-level collection of objects
expandPathsstring[]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)