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

# ReserveQueryProvider

Query provider exposing 3 data-access operation(s) (`GetIncurredCostForDate`, `GetLatestIncurredCost`, `GetTotalPaidToDateForCategory`) against 3 distinct table(s); see [sql/index.md](../../sql/index.md) for the full ORM operation catalog.

## Purpose
- Provides read/write access to 3 table(s) via NHibernate `IQueryable<T>`/`GetRepository<T>()` calls documented in [sql/index.md](../../sql/index.md).
- Exposes 3 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 |
| --- | --- | --- |
| GetLatestIncurredCost | `IncurredCostHistory GetLatestIncurredCost(long claimId)` | Executes an ORM query ([SQL-222](../../sql/SQL-222-reserve-query-provider-get-latest-incurred-cost.md)) against [CL_INCURRED_COST_HISTORY](../../database-tables.md#cl_incurred_cost_history), [CL_INJURY_CLAIM](../../database-tables.md#cl_injury_claim). |
| GetIncurredCostForDate | `IncurredCostHistory GetIncurredCostForDate(long claimId, DateTime effectiveDate)` | Executes an ORM query ([SQL-223](../../sql/SQL-223-reserve-query-provider-get-incurred-cost-for-date.md)) against [CL_INCURRED_COST_HISTORY](../../database-tables.md#cl_incurred_cost_history), [CL_INJURY_CLAIM](../../database-tables.md#cl_injury_claim). |
| GetTotalPaidToDateForCategory | `decimal GetTotalPaidToDateForCategory(long claimId, string costCategory)` | Executes an ORM query ([SQL-224](../../sql/SQL-224-reserve-query-provider-get-total-paid-to-date-for-category.md)) against [CL_PAYMENT_TOTAL](../../database-tables.md#cl_payment_total), [CL_INJURY_CLAIM](../../database-tables.md#cl_injury_claim). |
| ReserveQueryProvider(IRepositoryFactory factory, IBillQueryProvider billQueryProvider) | `ReserveQueryProvider(IRepositoryFactory factory, IBillQueryProvider billQueryProvider)` | 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/ReserveQueryProvider.cs`
