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

# SQL-306: TaskExtensions.FillTaskCategory

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

## Classification

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

## Tables

| Table | Access | Columns used |
| --- | --- | --- |
| [TASK_ACTION_CODE](../database-tables.md#task_action_code) | SELECT ×1 (hypothetical) | Code, CODE_DESCR |

## LINQ statement

Source: `Data/SAIF.Data/TestRepository/RepositoryExtensions/TaskExtensions.cs:50`.

```csharp
// Data/SAIF.Data/TestRepository/RepositoryExtensions/TaskExtensions.cs:50
var act = uow.GetRepository<TaskAction>().Query().SingleOrDefault(x => x.Code == "NONE");
```

## Sample SQL

> **Test double — no runtime SQL.** This statement executes against `TestUnitOfWork`/`TestRepository<T>` (in-memory, `List<TEntity>`-backed test doubles in `SAIF.Framework.Core`); no NHibernate session is opened and no SQL is issued at runtime. The SQL below is the hypothetical statement the same expression would produce against a real NHibernate `IUnitOfWork` using the in-repo mappings, shown to document the mapping shape only — **no database table is accessed when this code runs.**

> **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
-- line 50: Code == "NONE"
SELECT
  TAC.Code,
  TAC.CODE_DESCR
FROM TASK_ACTION_CODE TAC
WHERE TAC.Code = :p0  -- 'NONE'
-- SingleOrDefault
```

Translation notes:
- String constants (and captured values) are bound as parameters by NHibernate (`:p0`); the literal is shown in the trailing comment.

## Sources

- `Data/SAIF.Data/TestRepository/RepositoryExtensions/TaskExtensions.cs:50`
