SQL-378: Delete EbillInvoiceBill via ProcessInvoiceFile¶
This statement deletes each EbillInvoiceBill entity associated with an invoice, via IUnitOfWork.GetRepository<T>().Delete(entity) inside a foreach loop, invoked from EBillingService.ProcessInvoiceFile (Services/SAIF.Services/Claims/EBilling/EBillingService.cs:1169). One DELETE is issued per row (EBILL_INVOICE_BILL_SEQ_NUM). The SQL below is inferred from this repository call and the EbillInvoiceBill NHibernate mapping — it is not literal SQL present in source.
Classification¶
| Field | Value |
|---|---|
| SQL ID | SQL-378 |
| Operation type | Delete |
| Execution method | ORM (IRepository.Delete) |
| Database | Oracle |
| Schema | [unqualified]** |
| Command type | N/A (ORM-generated) |
| Business object | EbillInvoiceBill |
| Criteria property | N/A — ORM |
| Lifecycle method | ProcessInvoiceFile |
Parameters¶
| Parameter | Direction | Type | Max length | Description |
|---|---|---|---|---|
:Id |
Input | long | N/A | Identifier of the EbillInvoiceBill being deleted (EBILL_INVOICE_BILL_SEQ_NUM) |
Tables¶
| Table | Access | Columns used |
|---|---|---|
| EBILL_INVOICE_BILL | DELETE | EBILL_INVOICE_BILL_SEQ_NUM |
LINQ statement¶
Source: Services/SAIF.Services/Claims/EBilling/EBillingService.cs:1169
// Services/SAIF.Services/Claims/EBilling/EBillingService.cs:1167
foreach (var bill in oldInvoiceBills)
{
_unitOfWork.GetRepository<EbillInvoiceBill>().Delete(bill);
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
DELETE FROM EBILL_INVOICE_BILL
WHERE EBILL_INVOICE_BILL_SEQ_NUM = :Id
Translation notes:
- One DELETE per bill returned by
GetInvoiceBills(oldInvoice)(line 1166).
Operations and processes¶
- EbillingService.ProcessInvoiceFile — see Operations and processes
Sources¶
Services/SAIF.Services/Claims/EBilling/EBillingService.cs (L1169)