SQL-315: Retrieve SubpoenaStatus via ListOfSubpoenaStatus (property)¶
This statement retrieves all rows of SUBPOENA_STATUS_CODE via NHibernate LINQ over IUnitOfWork.GetRepository<SubpoenaStatus>(). It is executed by the SubpoenaService.ListOfSubpoenaStatus property (Services/SAIF.Services/Legal/Subpoenas/SubpoenaService.cs (L268)) to build the list of subpoena statuses exposed to callers.
Classification¶
| Field | Value |
|---|---|
| SQL ID | SQL-315 |
| Operation type | Read |
| Execution method | ORM (NHibernate LINQ) |
| Database | Oracle |
| Schema | [unqualified]** |
| Command type | N/A (ORM-generated) |
| Business object | SubpoenaService |
| Criteria property | N/A — ORM |
| Lifecycle method | ListOfSubpoenaStatus (property) |
Parameters¶
None (literals only or full-table read).
Tables¶
| Table | Access | Columns used |
|---|---|---|
| SUBPOENA_STATUS_CODE | SELECT | CODE, CODE_DESCR |
LINQ statement¶
Source: Services/SAIF.Services/Legal/Subpoenas/SubpoenaService.cs:266
// Services/SAIF.Services/Legal/Subpoenas/SubpoenaService.cs:266-268
var subpoenaStatusList =
Mapper.Map<IList<SubpoenaStatus>>(
_unitOfWork.GetRepository<LegalData.Subpoenas.SubpoenaStatus>().Query());
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.
-- Inferred from LINQ (NHibernate mapping translation); not concrete SQL
SELECT
SSC.CODE,
SSC.CODE_DESCR
FROM SUBPOENA_STATUS_CODE SSC
Translation notes:
- The cited line builds an unexecuted IQueryable; Mapper.Map enumerates it, producing a full-table read.
Operations and processes¶
- SubpoenaService.ListOfSubpoenaStatus (property) — see Operations and processes
Sources¶
Services/SAIF.Services/Legal/Subpoenas/SubpoenaService.cs (L268)