Exemplo n.º 1
0
 /// <summary>
 /// Loads the list.
 /// <example>
 ///         <code>
 /// User[] users = excelAccessor.LoadList&lt;User&gt;("Users Sheet", "A1:B10");
 /// </code>
 ///     </example>
 /// </summary>
 /// <typeparam name="T"></typeparam>
 /// <param name="sheetName">Name of the sheet.</param>
 /// <param name="range">The range.</param>
 /// <returns></returns>
 public T[] LoadList <T>(string sheetName, string range) where T : new()
 {
     using (IDataReader reader = GetReader(sheetName, range))
     {
         return(DbGateway.LoadList <T>(reader));
     }
 }
Exemplo n.º 2
0
 /// <summary>
 /// Loads the list of objects.
 /// </summary>
 /// <typeparam name="T">Type to load</typeparam>
 /// <returns></returns>
 public T[] LoadList <T>() where T : new()
 {
     return(DbGateway.LoadList <T>(this));
 }