---
title: AuditNoteQueryProvider
summary: API reference for AuditNoteQueryProvider.
status: draft
owner: SAIF.Core documentation team
last_reviewed: 2026-09-24
library: SAIF.Data
reference_type: package
---

# AuditNoteQueryProvider

Query provider exposing 9 data-access operation(s) (`GetAllAuditNotes`, `GetAuditNote`, `GetAuditNotesForBill`, `GetAuditNotesForClaim`, `GetNoteCategories`, `GetNoteTypeCode` and 3 more) against 4 distinct table(s); see [sql/index.md](../../sql/index.md) for the full ORM operation catalog.

## Purpose
- Provides read/write access to 4 table(s) via NHibernate `IQueryable<T>`/`GetRepository<T>()` calls documented in [sql/index.md](../../sql/index.md).
- Exposes 9 public query/command method(s) consumed by higher application layers; see [database-tables.md](../../database-tables.md) for the underlying schema.

## Context
- Namespace: `SAIF.Data.Queries.Claims`
- Assembly/package: `SAIF.Data`

## Public members
| Member | Signature | Purpose |
| --- | --- | --- |
| GetAuditNote | `CbpNote GetAuditNote(long noteId)` | Executes an ORM query ([SQL-004](../../sql/SQL-004-audit-note-query-provider-get-audit-note.md)) against [CBP_NOTE](../../database-tables.md#cbp_note). |
| GetAuditNotesForClaim | `IEnumerable<CbpNote> GetAuditNotesForClaim(long claimId, bool includeInactive = false)` | Executes an ORM query ([SQL-005](../../sql/SQL-005-audit-note-query-provider-get-audit-notes-for-claim.md)) against [CBP_NOTE](../../database-tables.md#cbp_note). |
| GetAuditNotesForBill | `IEnumerable<CbpNote> GetAuditNotesForBill(long billId, bool includeInactive = false)` | Executes an ORM query ([SQL-006](../../sql/SQL-006-audit-note-query-provider-get-audit-notes-for-bill.md)) against [CBP_NOTE](../../database-tables.md#cbp_note), [CBP_BILL](../../database-tables.md#cbp_bill). |
| GetAllAuditNotes | `IEnumerable<CbpNote> GetAllAuditNotes(long billId, long claimId, bool includeInactive = false)` | Executes an ORM query ([SQL-007](../../sql/SQL-007-audit-note-query-provider-get-all-audit-notes.md)) against [CBP_NOTE](../../database-tables.md#cbp_note), [CBP_BILL](../../database-tables.md#cbp_bill). |
| GetNoteTypeCode | `CbpNoteTypeCode GetNoteTypeCode(string typeCode, string categoryCode)` | Executes an ORM query ([SQL-008](../../sql/SQL-008-audit-note-query-provider-get-note-type-code.md)) against [CBP_NOTE_TYPE_CODE](../../database-tables.md#cbp_note_type_code), [CBP_NOTE_CATEGORY_CODE](../../database-tables.md#cbp_note_category_code). |
| GetNoteCategories | `IEnumerable<CbpNoteCategoryCode> GetNoteCategories()` | Executes an ORM query ([SQL-009](../../sql/SQL-009-audit-note-query-provider-get-note-categories.md)) against [CBP_NOTE_CATEGORY_CODE](../../database-tables.md#cbp_note_category_code). |
| GetNoteTypes | `IEnumerable<CbpNoteTypeCode> GetNoteTypes()` | Executes an ORM query ([SQL-010](../../sql/SQL-010-audit-note-query-provider-get-note-types.md)) against [CBP_NOTE_TYPE_CODE](../../database-tables.md#cbp_note_type_code). |
| GetNoteTypesForCategory | `IEnumerable<CbpNoteTypeCode> GetNoteTypesForCategory(string category)` | Executes an ORM query ([SQL-011](../../sql/SQL-011-audit-note-query-provider-get-note-types-for-category.md)) against [CBP_NOTE_TYPE_CODE](../../database-tables.md#cbp_note_type_code), [CBP_NOTE_CATEGORY_CODE](../../database-tables.md#cbp_note_category_code). |
| IsAuditNoteNoContention | `bool IsAuditNoteNoContention(long noteId, int updateNumber)` | Executes an ORM query ([SQL-012](../../sql/SQL-012-audit-note-query-provider-is-audit-note-no-contention.md)) against [CBP_NOTE](../../database-tables.md#cbp_note). |
| AuditNoteQueryProvider(IRepositoryFactory factory) | `AuditNoteQueryProvider(IRepositoryFactory factory)` | Initializes a new instance, wiring the repository factory used by this provider's query methods.* |

## Behavioral notes
- Query methods build LINQ expressions over `IQueryable<T>` obtained via `Factory.GetRepository<T>()` and execute them against the underlying NHibernate session.*

## Constraints and usage notes
- Instances are constructed with an `IRepositoryFactory` and are expected to be resolved through dependency injection rather than instantiated directly.*

> **Note:** Statements marked with * were inferred from code structure, naming conventions, or contextual evidence where direct confirmation was not available in source artifacts. Statements marked with ** could not be confirmed; treat as unknown until verified.

## Sources
- `Data/SAIF.Data/Queries/Claims/AuditNoteQueryProvider.cs`
