---
title: "SQL-149: ImageQueryProvider.GetImageSystem"
summary: Read operation for `ImageQueryProvider.GetImageSystem`
status: draft
owner: SAIF.Core documentation team
last_reviewed: 2026-09-24
library: SAIF.Data
reference_type: package
---

# SQL-149: ImageQueryProvider.GetImageSystem

This statement is a read operation invoked through ORM (NHibernate LINQ). Executed by `ImageQueryProvider.GetImageSystem`.

## Classification

| Field | Value |
| --- | --- |
| **SQL ID** | SQL-149 |
| **Operation type** | Read |
| **Execution method** | ORM (NHibernate LINQ) |
| **Database** | Oracle* |
| **Schema** | Unknown** |
| **Command type** | N/A (ORM-generated) |
| **Business object** | `ImageQueryProvider` |
| **Criteria property** | N/A — ORM |
| **Lifecycle method** | `GetImageSystem` |

## Parameters

| Parameter | Direction | Type | Max length | Description |
| --- | --- | --- | --- | --- |
| `towId` | Input | long | N/A | Method argument of `ImageQueryProvider.GetImageSystem` bound into the ORM expression; NHibernate generates the bind variable at runtime |

## Tables

| Table | Access | Columns used |
| --- | --- | --- |
| [IMGSYS](../database-tables.md#imgsys)** | SELECT | unresolved (see Unresolved mapping) |

## LINQ statement

Source: `Data/SAIF.Data/Queries/Policies/Images/ImageQueryProvider.cs:32`

```csharp
// Data/SAIF.Data/Queries/Policies/Images/ImageQueryProvider.cs:32
return Factory.GetRepository<ImageSystem>().Query()
    .SingleOrDefault(ic => ic.TowId == towId);
```

## 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
  <all mapped columns of ImageSystem> -- unresolved mapping: ImageSystem column list not documented
FROM IMGSYS IS1
WHERE IS1.<TowId column> = :towId -- unresolved mapping: ImageSystem.TowId
-- NHibernate expects at most one row
```

Translation notes:
- The alias `IS1` is used because `IS` is an Oracle reserved word.

## Operations and processes

- [Other query providers](../operations/other-query-providers.md)

> **Note:** Statements marked with `**` could not be confirmed; treat
> as unknown until verified.

## Sources
- `Data/SAIF.Data/Queries/Policies/Images/ImageQueryProvider.cs:32`
