---
title: "SQL-192: Retrieve ErrorEnvironment via Environments (property)"
summary: Read operation against ErrorEnvironment via NHibernate ORM.
status: draft
owner: SAIF Doc Gen
last_reviewed: 2026-09-25
library: SAIF.Services
reference_type: package
---

# SQL-192: Retrieve ErrorEnvironment via Environments (property)

This statement retrieves every `ErrorEnvironment` row unfiltered, called from the `Environments` property in `OnlineSupportRepository`. `OnlineSupportRepository` is registered against the Oracle provider (user `GEN`).

## Classification

| Field | Value |
| --- | --- |
| **SQL ID** | SQL-192 |
| **Operation type** | Read |
| **Execution method** | ORM (NHibernate LINQ) |
| **Database** | Oracle |
| **Schema** | [unqualified]** |
| **Command type** | N/A (ORM-generated) |
| **Business object** | `OnlineSupportRepository` |
| **Criteria property** | N/A — ORM |
| **Lifecycle method** | `Environments (property)` |

## Parameters

None — unfiltered read.

## Tables

| Table | Access | Columns used |
| --- | --- | --- |
| [ERROR_ENVIRONMENT](../database-tables.md#error_environment) | SELECT | `ID`, `ENVIRONMENT_NAME`, `DESCRIPTION` |

## LINQ statement

Source: `Services/SAIF.Services/OnlineSupport/Repositories/OnlineSupportRepository.cs:60`

```csharp
var data = _unitOfWork.GetRepository<ErrorEnvironment>().Query().ToList();
```

## Sample SQL

> **Inferred SQL:** This SQL was inferred from the LINQ statement above and the NHibernate mappings. It is not concrete SQL from source code; NHibernate generates the executed statement at runtime, so aliases, column order, join syntax, and bind-parameter names may differ.

```sql
-- Inferred from LINQ (NHibernate mapping translation); not concrete SQL
SELECT EE.ID,
       EE.ENVIRONMENT_NAME,
       EE.DESCRIPTION
FROM   ERROR_ENVIRONMENT EE
```

Translation notes:
- Unfiltered read; the projection to `EnvironmentDetail` at L62-68 runs in memory.

## Operations and processes
- OnlineSupportRepository.Environments (property) — see [Operations and processes](../operations-processes.md)

## Sources
- `Services/SAIF.Services/OnlineSupport/Repositories/OnlineSupportRepository.cs (L60)`
