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

# SQL-193: Retrieve ErrorGroupCode via EnvironmentGroups (property)

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

## Classification

| Field | Value |
| --- | --- |
| **SQL ID** | SQL-193 |
| **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** | `EnvironmentGroups (property)` |

## Parameters

None — unfiltered read.

## Tables

| Table | Access | Columns used |
| --- | --- | --- |
| [ERROR_GROUP_CODE](../database-tables.md#error_group_code) | SELECT | `CODE`, `DESCRIPTION` |

## LINQ statement

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

```csharp
var data = _unitOfWork.GetRepository<ErrorGroupCode>().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 EGC.CODE,
       EGC.DESCRIPTION
FROM   ERROR_GROUP_CODE EGC
```

Translation notes:
- Unfiltered read; projection runs in memory.

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

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