# Pams.Storage

**Kind:** Module

**Source:** `Pams/Logic/Pams.Storage/Pams.Storage.csproj` (line 1)

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

.NET project in solution

Pams.Storage is the .NET project for storage concerns in the Pams solution. It sits between Pams logic and the persistence store, keeping read and write operations separate from higher-level application code.

## Diagram

```mermaid
graph TD
  Client[Client Application] --> Api[Pams Application API]
  Api --> Logic[Pams Logic]
  Logic --> Storage[Pams.Storage]
  Storage --> Store[Persistence Store]
```

## Usage

```ts
// Pams.Storage runs within the .NET application.
// Client code accesses storage-backed data through the application's API.

const response = await fetch("/api/pams/items", {
  method: "GET",
  headers: {
    Accept: "application/json",
  },
});

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

const items = await response.json();
console.log(items);
```

## AI Coding Instructions

- Keep persistence-specific code in `Pams.Storage`; keep application and client code independent of storage details.
- Access storage from TypeScript through application API endpoints rather than directly from browser code.
- Keep connection settings and credentials outside source code, using the application's configuration mechanism.
- When changing stored data structures, coordinate schema or migration changes with the target persistence store.

## Relationships

- DEPENDS_ON → `Google.Apis`
- DEPENDS_ON → `Google.Apis.Auth`
- DEPENDS_ON → `Google.Apis.Auth.PlatformServices`
- DEPENDS_ON → `Google.Apis.Core`
- DEPENDS_ON → `Google.Apis.PlatformServices`
- DEPENDS_ON → `Google.Apis.Storage.v1`
- DEPENDS_ON → `log4net`
- DEPENDS_ON → `Microsoft.Threading.Tasks`
- DEPENDS_ON → `Microsoft.Threading.Tasks.Extensions`
- DEPENDS_ON → `Microsoft.Threading.Tasks.Extensions.Desktop`
- DEPENDS_ON → `Newtonsoft.Json`
- DEPENDS_ON → `System`
- DEPENDS_ON → `System.Net.Http.Primitives`
- DEPENDS_ON → `System.Net.Http.WebRequest`

## Used by

3 references from 3 files. Each is a place in this repository where the symbol is actually used — go read one rather than trusting an example.

### Injected or called by (2)

- `Pams.API` — `Pams/API/Pams.API/Pams.API.csproj`:1
- `Pams.Business` — `Pams/Logic/Pams.Business/Pams.Business.csproj`:1

### Declared in (1)

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