---
title: "Group image soft delete"
summary: Operation implemented by GroupImageRepository.Delete
status: draft
owner: SAIF.Core documentation team
last_reviewed: 2026-09-24
library: SAIF.Data.NHibernate
reference_type: package
operation_id: "OP-SDN-12"
trigger: "See steps below"
---


# Group image soft delete

Group image soft delete is implemented by `GroupImageRepository.Delete` and is documented as OP-SDN-12 in the Stage 1 analysis.

| Field | Value |
| --- | --- |
| **Operation ID** | OP-SDN-12 |
| **Trigger** | See steps below |
| **Primary components** | `GroupImageRepository.Delete` |

## Steps

1. Load the `ImageGroup` (`Image_Group`) and its `Image`.
2. If `ImageDeleteCode` is blank or `" "`, set it to "Y" and stamp the update user and date.
   - Rule: [SDN-BR-040](../business-rules.md#sdn-br-040-group-image-delete-is-a-soft-delete).
   - Write via the unit of work.

## Process flow

The following diagram visualizes this operation's control flow.

```mermaid
flowchart TD
	Start(["Group image soft delete"]) --> S1["`GroupImageRepository.Delete`"]
	S1 --> S2{"Rules satisfied?"}
	S2 -->|Yes| EndOk([Result returned])
	S2 -->|No| EndErr([Exception / empty result])
```

## Related documentation
- [Operations and processes](../operations-processes.md)
- [Business rules](../business-rules.md)
- [SQL catalog](../sql/index.md)
- [Database tables](../database-tables.md)

## Sources
- `Data/SAIF.Data.NHibernate/Repositories/Groups/GroupImageRepository.cs`
