---
title: "SQL-143: EdiQueryProvider.GetBillReport"
summary: Read operation for `EdiQueryProvider.GetBillReport`
status: draft
owner: SAIF.Core documentation team
last_reviewed: 2026-09-24
library: SAIF.Data
reference_type: package
---

# SQL-143: EdiQueryProvider.GetBillReport

This statement is a read operation invoked through ORM (NHibernate LINQ). Executed by `EdiQueryProvider.GetBillReport`.

## Classification

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

## Parameters

| Parameter | Direction | Type | Max length | Description |
| --- | --- | --- | --- | --- |
| `:billId` | Input | long | N/A | Method argument. Named `billId` but compared to the `BillReport` identifier |

## Tables

| Table | Access | Columns used |
| --- | --- | --- |
| [EDI_BILL_REPORT](../database-tables.md#edi_bill_report) | SELECT | `EDI_BILL_REPORT_SEQ_NUM`, `UPDATE_NUM`, `REPORT_DATE`, `PERIOD_BEGIN_DATE`, `PERIOD_END_DATE`, `EDI_BILL_REPORT_STATUS_CODE`, `UPDATE_DATE`, `UPDATE_USER` |

## LINQ statement

Source: `Data/SAIF.Data/Queries/Edi/EdiQueryProvider.cs:21`. The repository is obtained at `Data/SAIF.Data/Queries/Edi/EdiQueryProvider.cs:15`.

```csharp
// Data/SAIF.Data/Queries/Edi/EdiQueryProvider.cs:15
_billReportRepository = Factory.GetRepository<BillReport>().Query();

// Data/SAIF.Data/Queries/Edi/EdiQueryProvider.cs:21
return _billReportRepository.SingleOrDefault(x => x.Id == billId);
```

## 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.

```sql
-- Inferred from LINQ (NHibernate mapping translation); not concrete SQL
SELECT
  EBR.EDI_BILL_REPORT_SEQ_NUM,
  EBR.UPDATE_NUM,
  EBR.REPORT_DATE,
  EBR.PERIOD_BEGIN_DATE,
  EBR.PERIOD_END_DATE,
  EBR.EDI_BILL_REPORT_STATUS_CODE,
  EBR.UPDATE_DATE,
  EBR.UPDATE_USER
FROM EDI_BILL_REPORT EBR
WHERE EBR.EDI_BILL_REPORT_SEQ_NUM = :billId
-- NHibernate expects at most one row
```

Translation notes:
- Direct translation: an equality predicate on mapped columns. No navigation, joins or in-memory operators.

## Operations and processes

- [Other query providers](../operations/other-query-providers.md)


## Sources
- `Data/SAIF.Data/Queries/Edi/EdiQueryProvider.cs:21`
