Пример #1
0
 public DataTable GetDataTable(RequestContext context)
 {
     return(ExecuteWrap((dbSession) =>
     {
         IDataReader dataReader = null;
         try
         {
             dataReader = CommandExecuter.ExecuteReader(dbSession, context);
             return DataReaderConvert.ToDataTable(dataReader);
         }
         finally
         {
             DisposeReader(dataReader);
         }
     }, context, DataSourceChoice.Read));
 }
Пример #2
0
 public DataTable GetDataTable(RequestContext context)
 {
     return(ExecuteWrap((dbSession) =>
     {
         IDataReader dataReader = null;
         try
         {
             dataReader = CommandExecuter.ExecuteReader(dbSession, context);
             return DataReaderConvert.ToDataTable(dataReader);
         }
         finally
         {
             if (dataReader != null)
             {
                 dataReader.Dispose();
             }
         }
     }, context));
 }