Skip to content

SQL-073: Retrieve AdjustmentReason via ListOfAdjustmentReasons (property)

This ORM statement performs a read operation on AdjustmentReason via ListOfAdjustmentReasons (property), executed from Services/SAIF.Services/Legal/Bills/BillService.cs (L358-360).

Classification

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

Parameters

Parameter Direction Type Max length Description
(none) N/A N/A N/A No bind parameters

Tables

Table Access Columns used
ADJUSTMENT_REASON_CODE SELECT CODE, CODE_DESCR, CODE_LONG_DESCR, MAIL_MERGE_TEXT

LINQ statement

Source: Services/SAIF.Services/Legal/Bills/BillService.cs:358-360.

// Services/SAIF.Services/Legal/Bills/BillService.cs:358
return
    Mapper.Map<IList<AdjustmentReason>>(_unitOfWork.GetRepository<BillData.AdjustmentReason>().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
  ARC.CODE,
  ARC.CODE_DESCR,
  ARC.CODE_LONG_DESCR,
  ARC.MAIL_MERGE_TEXT
FROM ADJUSTMENT_REASON_CODE ARC

Translation notes: - Mapper.Map<IList<AdjustmentReason>>(...Query()) enumerates the full IQueryable (no predicate); the trailing .ToList() runs in memory on the mapped list and produces no SQL.

Operations and processes

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

Sources

  • Services/SAIF.Services/Legal/Bills/BillService.cs (L359)