---
title: "SQL-369: Delete DocumentDistributionLog via DeleteRequestDistributionById"
summary: Delete operation against DocumentDistributionLog via NHibernate ORM.
status: draft
owner: SAIF Doc Gen
last_reviewed: 2026-09-24
library: SAIF.Services
reference_type: package
---

# SQL-369: Delete DocumentDistributionLog via DeleteRequestDistributionById

This statement deletes the `DocumentDistributionLog` entity identified by its identifier (`DOCUMENT_DIST_LOG_SEQ_NUM`) via `IUnitOfWork.GetRepository<T>().Delete(entity)`, invoked from `DocumentRequestService.DeleteRequestDistributionById` (`Services/SAIF.Services/Documents/DocumentRequestService.cs:531`). The SQL below is inferred from this repository call and the `DocumentDistributionLog` NHibernate mapping — it is not literal SQL present in source.

## Classification

| Field | Value |
| --- | --- |
| **SQL ID** | SQL-369 |
| **Operation type** | Delete |
| **Execution method** | ORM (IRepository.Delete) |
| **Database** | Oracle |
| **Schema** | [unqualified]** |
| **Command type** | N/A (ORM-generated) |
| **Business object** | `DocumentDistributionLog` |
| **Criteria property** | N/A — ORM |
| **Lifecycle method** | `DeleteRequestDistributionById` |

## Parameters

| Parameter | Direction | Type | Max length | Description |
| --- | --- | --- | --- | --- |
| `:Id` | Input | long | N/A | Identifier of the DocumentDistributionLog being deleted (`DOCUMENT_DIST_LOG_SEQ_NUM`) |

## Tables

| Table | Access | Columns used |
| --- | --- | --- |
| [DOCUMENT_DISTRIBUTION_LOG](../database-tables.md#document_distribution_log) | DELETE | `DOCUMENT_DIST_LOG_SEQ_NUM` |

## LINQ statement

Source: `Services/SAIF.Services/Documents/DocumentRequestService.cs:531`

```csharp
// Services/SAIF.Services/Documents/DocumentRequestService.cs:531
UnitOfWork.GetRepository<DocumentDistributionLog>().Delete(log);
```

## 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
DELETE FROM DOCUMENT_DISTRIBUTION_LOG
WHERE DOCUMENT_DIST_LOG_SEQ_NUM = :Id
```

Translation notes:

- Entity loaded at line 529 (separate read).

## Operations and processes
- DocumentRequestService.DeleteRequestDistributionById — see [Operations and processes](../operations-processes.md)

## Sources
- `Services/SAIF.Services/Documents/DocumentRequestService.cs (L531)`
