Esempio n. 1
0
        public IEnumerable <T> ExecuteReader <T>(string commandText, Action <OracleParameterCollection> parametersBuilder, Action <DbFieldMap <T> > resultMap = null,
                                                 CommandType commandType = CommandType.StoredProcedure, int commandTimeout = 0) where T : class, new()
        {
            using (DbDataReader reader = CreateReader(commandText, commandTimeout, commandType, parametersBuilder))
            {
                DbFieldMap <T> map = new DbFieldMap <T>();

                map.PrepareResultMap(resultMap);

                while (reader.Read())
                {
                    yield return(map.ReadNew(reader));
                }
            }
        }
Esempio n. 2
0
 public DbResultAdapter(ICollection <T> resultSet, Action <DbFieldMap <T> > resultMap)
 {
     _ResultSet = resultSet;
     _FieldMap  = new DbFieldMap <T>();
     _FieldMap.PrepareResultMap(resultMap);
 }