Beispiel #1
0
 /// <summary>
 /// Materialize data from reader to instances of model type T.
 /// </summary>
 /// <typeparam name="T">Type of model.</typeparam>
 /// <param name="reader">The reader from which materialize data.</param>
 /// <returns>
 /// IEnumerable of models.
 /// </returns>
 /// <example>
 /// <code source="..\..\Documentation\Examples\Kros.KORM.Examples\IModelBuilderExample.cs"
 ///     title="Materialize data table"
 ///     region="ModelBuilderDataTableExample"
 ///     language="cs" />
 /// </example>
 /// <remarks>
 /// If disposeReader is <see langword="true"/> and connection is not null, then connection will be disposed.
 /// </remarks>
 public IEnumerable <T> Materialize <T>(IDataReader reader)
 {
     return(new ModelBuilderEnumerable <T>(_modelFactory.GetFactory <T>(reader), reader));
 }