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)); }
public IList <T> Find <T>(SqlQuery sqlQuery) { var resultSet = FindResultSet <T>(sqlQuery); if (sqlQuery.ObjectRelations.Any()) { return(EntityMapper.CreateInstanceGraphs <T>(resultSet, sqlQuery.ObjectRelations, sqlQuery.PrimaryAlias)); } return(EntityMapper.CreateInstanceGraphs <T>(resultSet)); }