Beispiel #1
0
        private IList <T> ReadEntities <T>(DbCommand command, SqlQuery sqlQuery) where T : new()
        {
            var resultSet = _dbCommandExecutor.ExecuteQuery(command, ConnectionString);

            if (sqlQuery.ObjectRelations.Any())
            {
                return(_entityMapper.CreateInstanceGraphs <T>(resultSet, sqlQuery.ObjectRelations, sqlQuery.PrimaryAlias));
            }

            return(_entityMapper.CreateInstanceGraphs <T>(resultSet));
        }
Beispiel #2
0
 public IList <T> ExecuteList()
 {
     return(_dbCommandExecutor.ExecuteQuery(Command, _entityMapper.CreateInstance <T>, ConnectionString));
 }