Skip to content

SQL-213: Retrieve InterestRateValue via GetInterestRates

This statement retrieves every interest rate value, ordered by rate, so that CollectionsService.GetInterestRates can populate a rate list. It is issued through NHibernate LINQ against the InterestRateValue entity from Services/SAIF.Services/Collections/CollectionsService.cs:1097.

Classification

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

Parameters

Parameters: None.

Tables

Table Access Columns used
INTEREST_RATE_VALUE SELECT INTEREST_RATE_VALUE

LINQ statement

Source: Services/SAIF.Services/Collections/CollectionsService.cs:1097

return Mapper.Map<InterestRateValue[]>(UnitOfWork.GetRepository<DataModel.InterestRateValue>()
    .Query().OrderBy(x => x.Rate).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 IRV.INTEREST_RATE_VALUE
FROM   INTEREST_RATE_VALUE IRV
ORDER BY IRV.INTEREST_RATE_VALUE;

Translation notes: - The single mapped column is the identifier Rate → INTEREST_RATE_VALUE.

Operations and processes

Sources

  • Services/SAIF.Services/Collections/CollectionsService.cs (L1097)