Skip to content

SQL-274: Retrieve ProcessServer via ListOfProcessServers (property)

This statement performs a full-table read of ProcessServer via NHibernate LINQ, retrieved through IUnitOfWork.GetRepository<T>().Query() and materialized with .ToList() in SubpoenaService.ListOfProcessServers, executed from Services/SAIF.Services/Legal/Subpoenas/SubpoenaService.cs (L389).

Classification

Field Value
SQL ID SQL-274
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 ListOfProcessServers (property)

Parameters

Parameter Direction Type Max length Description
(none) N/A N/A N/A Full-table read — no filter predicate

Tables

Table Access Columns used
PROCESS_SERVER SELECT LOCATION_SEQ_NUM, EMAIL_ADDRESS, UPDATE_USER, UPDATE_DATE

LINQ statement

Source: Services/SAIF.Services/Legal/Subpoenas/SubpoenaService.cs:387

// Services/SAIF.Services/Legal/Subpoenas/SubpoenaService.cs:387-389
var listOfProcessServers =
    Mapper.Map<IList<ProcessServer>>(
        _unitOfWork.GetRepository<LegalData.ProcessServer>().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.

-- Inferred from LINQ (NHibernate mapping translation); not concrete SQL
SELECT
  PS.LOCATION_SEQ_NUM,
  PS.EMAIL_ADDRESS,
  PS.UPDATE_USER,
  PS.UPDATE_DATE
FROM PROCESS_SERVER PS

Translation notes: - LOCATION_SEQ_NUM is both Id and References column (ProcessServerMap.cs:11-12); selected once. - Full-table read; .ToList() materializes, Mapper.Map runs in memory.

Operations and processes

Sources

  • Services/SAIF.Services/Legal/Subpoenas/SubpoenaService.cs (L389)