---
title: "Provider address retrieval"
summary: Operation implemented by ProvidersRepository
status: draft
owner: SAIF.Core documentation team
last_reviewed: 2026-09-24
library: SAIF.Data.NHibernate
reference_type: package
operation_id: "OP-SDN-11"
trigger: "See steps below"
---


# Provider address retrieval

Provider address retrieval is implemented by `ProvidersRepository` and is documented as OP-SDN-11 in the Stage 1 analysis.

| Field | Value |
| --- | --- |
| **Operation ID** | OP-SDN-11 |
| **Trigger** | See steps below |
| **Primary components** | `ProvidersRepository` |

## Steps

1. The constructor validates the unit of work with `Enforce.ArgumentNotNull`.
   - Rule: [SDN-BR-030](../business-rules.md#sdn-br-030-providersrepository-requires-a-non-null-unit-of-work).
   - Delegates: SAIF.Framework.Core / `Enforce`.
2. `GetProviderByTaxIdBatch(taxId)`: LINQ over `Provider` / `ProviderTaxId` (tables `PROVIDER`, `PROVIDER_TAX_ID`).
3. `GetProviderAddresses(providerId, addressType)`, and the typed variants:
   - `GetProviderPaymentAddresses` uses "PAY".
   - `GetProviderPhysicalAddresses` uses "PHY".
   - Table: `PROVIDER_ADDRESS`.
   - Rule: [SDN-BR-031](../business-rules.md#sdn-br-031-provider-payment-address-type-%3D-pay%2C-physical-%3D-phy).

## Process flow

The following diagram visualizes this operation's control flow.

```mermaid
flowchart TD
	Start(["Provider address retrieval"]) --> S1["`ProvidersRepository`"]
	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/ProvidersRepository.cs`
