Skip to content

SQL-096: Retrieve BillService via ListOfBillServiceCodes (property)

This ORM statement performs a read operation on BillService via IUnitOfWork.GetRepository<T>(), executed from Services/SAIF.Services/Legal/Bills/BillService.cs (L377).

Classification

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

Parameters

Parameter Direction Type Max length Description
(none) N/A N/A N/A No inline filter — full-entity read (Query().ToList()/projection) or filters appended later

Tables

Table Access Columns used
BILL_SERVICE_CODE SELECT CODE, CODE_DESCR, GL_EXPENSE_ACCOUNT_NUM, SPEND_CATEGORY

LINQ statement

Source: Services/SAIF.Services/Legal/Bills/BillService.cs:376

// Services/SAIF.Services/Legal/Bills/BillService.cs:376-378
                return
                    Mapper.Map<IList<BillServiceCode>>(_unitOfWork.GetRepository<BillData.BillService>().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
-- Services/SAIF.Services/Legal/Bills/BillService.cs:377
SELECT
  BSC.CODE,
  BSC.CODE_DESCR,
  BSC.GL_EXPENSE_ACCOUNT_NUM,
  BSC.SPEND_CATEGORY
FROM BILL_SERVICE_CODE BSC

Translation notes: - Mapper.Map<IList<BillServiceCode>>(...Query()) enumerates the whole table (no predicate); .ToList() is in memory.

Operations and processes

Sources

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