# Data

**Kind:** Module

**Source:** `Pams/Data` (line 1)

**Part of:** [Pams](subsystem-pams)

.NET project in solution

`Data` is a .NET project in the solution at `Pams/Data`. It contains the data-layer boundary consumed by .NET application code, while browser clients access its behavior through an API rather than importing the project directly.

## Diagram

```mermaid
graph TD
    Client[TypeScript Client] --> Api[Application API]
    Api --> Data[Pams/Data .NET Project]
    Data --> Store[Data Store]
```

## Usage

```ts
// Browser code calls an API endpoint backed by the .NET application,
// which references the Data project.
export async function loadData() {
  const response = await fetch("/api/data");

  if (!response.ok) {
    throw new Error("Unable to load data.");
  }

  return response.json();
}
```

## AI Coding Instructions

- Keep persistence-related code within the `Pams/Data` project rather than placing it in browser or API client code.
- Reference `Data` from .NET application projects that need data access behavior.
- Do not import the .NET project directly from TypeScript; expose required operations through an API contract.
- Keep API request and response models aligned with the .NET code that consumes `Data`.

## Used by

1 reference from 1 file. Each is a place in this repository where the symbol is actually used — go read one rather than trusting an example.

### Declared in (1)

- `Pams` — `Pams/Pams.sln`:1
