# System.Data

**Kind:** Service

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

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

NuGet package dependency

`System.Data` is a NuGet package dependency declared by the `Pams.Data` project. It supplies .NET data-related types used by the data layer and is restored as part of the project build.

## Diagram

```mermaid
sequenceDiagram
    participant Developer
    participant Project as Pams.Data project
    participant NuGet
    participant SystemData as System.Data package

    Developer->>Project: Restore or build project
    Project->>NuGet: Resolve package dependency
    NuGet-->>Project: Download System.Data
    Project-->>Developer: Build with data types available
```

## Usage

```ts
import { spawnSync } from "node:child_process";

const projectPath = "Pams/Data/Pams.Data/Pams.Data.csproj";

const result = spawnSync("dotnet", ["restore", projectPath], {
  stdio: "inherit",
});

if (result.error) {
  throw result.error;
}
```

## AI Coding Instructions

- Keep the `System.Data` dependency declaration in the `Pams.Data.csproj` project file.
- Restore the project before building or running code that references `System.Data` types.
- Follow the project’s existing legacy package declaration format when changing dependencies.
- Do not add a JavaScript runtime import for `System.Data`; it is resolved by the .NET project build.
