# System.Data.DataSetExtensions

**Kind:** Service

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

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

NuGet package dependency

`System.Data.DataSetExtensions` is a NuGet package dependency declared in `Pams.Business.csproj`. It adds extension methods for working with `DataSet`, `DataTable`, and related ADO.NET types in the Pams business layer.

## Diagram

```mermaid
sequenceDiagram
    participant Project as Pams.Business.csproj
    participant NuGet as NuGet restore
    participant Package as System.Data.DataSetExtensions
    participant Business as Pams.Business

    Project->>NuGet: Restore package reference
    NuGet->>Package: Download dependency
    Package-->>Business: Add DataSet extension methods
```

## Usage

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

const projectFile = "Pams/Logic/Pams.Business/Pams.Business.csproj";

execFileSync(
  "dotnet",
  ["add", projectFile, "package", "System.Data.DataSetExtensions"],
  { stdio: "inherit" },
);
```

## AI Coding Instructions

- Keep the package reference in `Pams.Business.csproj` when code depends on `DataSet` or `DataTable` extension methods.
- Check existing ADO.NET data access code before adding this dependency to another project.
- Avoid replacing legacy `DataSet` handling with a different data-access pattern unless the calling code is updated with it.
- Restore NuGet packages after editing the project file or package references.
