/// <summary> /// Parse the results of a sql query which returns a comlex object /// </summary> /// <param name="rows">The query results</param> /// <param name="propertyGraph">The query columns mapped to an object graph</param> static IEnumerable <TResult> ParseComplex <TResult>(this IEnumerable <object[]> rows, RootObjectPropertyGraph propertyGraph, ILogger logger, IPropMapValueCache propMapBuilder) { var objectGraphCache = new ObjectGraphCache(logger); var builder = Builders.GetBuilder <TResult>(); foreach (var obj in CreateObject(propertyGraph, objectGraphCache, rows, logger)) { var result = builder.Build(obj, propMapBuilder, logger); obj.Dispose(); yield return(result); } }