---
title: "SQL-256: Builder.Repository"
summary: Repository accessor for `Builder.Repository`
status: draft
owner: SAIF.Core documentation team
last_reviewed: 2026-09-24
library: SAIF.Data
reference_type: package
---

# SQL-256: Builder.Repository

This is a repository-handle accessor — `Builder<T>.Repository` returns a repository instance for an open generic `T` and issues no query. No SQL is executed by `Builder.Repository`.

## Classification

| Field | Value |
| --- | --- |
| **SQL ID** | SQL-256 |
| **Operation type** | N/A (no query executed) |
| **Execution method** | N/A (no query executed) |
| **Database** | Oracle* |
| **Schema** | [unqualified]** |
| **Command type** | N/A (no query executed) |
| **Business object** | `Builder` |
| **Criteria property** | N/A — no query |
| **Lifecycle method** | `Repository` |

## Tables

_No tables are accessed. This statement is a generic repository-handle accessor with no bound entity type, so no table or column can be attributed to it._

## Repository accessor

Source: `Data/SAIF.Data/TestRepository/RepositoryBuilders/Builder.cs:12`.

```csharp
// Data/SAIF.Data/TestRepository/RepositoryBuilders/Builder.cs:12
protected IRepository<T> Repository { get { return Uow.GetRepository<T>(); } }
```

## 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 — **no database table is accessed when this code runs.**

> **Cannot be reliably inferred.** `Builder<T>.Repository` is a protected property getter returning `Uow.GetRepository<T>()` for an open generic `T`. `GetRepository<T>()` only resolves a repository object; it issues no query, and `T` is not bound to any entity (hence no mapping). There is no LINQ expression to translate. Recommend the Writer document this as "repository accessor — no data access" or retire the page.

## Sources

- `Data/SAIF.Data/TestRepository/RepositoryBuilders/Builder.cs:12`
