# EntityFramework

**Kind:** Service

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

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

NuGet package dependency

`EntityFramework` is a NuGet package dependency declared by `Pams.Data/Pams.Data.csproj`. The Pams.Data project uses it for data access and database mapping within the Pams system.

## Diagram

```mermaid
sequenceDiagram
    participant Build as .NET Build
    participant Project as Pams.Data.csproj
    participant NuGet as NuGet
    participant EF as EntityFramework
    participant Data as Pams.Data

    Build->>Project: Restore project dependencies
    Project->>NuGet: Request EntityFramework package
    NuGet-->>Project: Resolve package files
    Project->>EF: Reference EntityFramework assemblies
    EF-->>Data: Enable data-access code
```

## Usage

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

const projectFile = path.join(
  "Pams",
  "Data",
  "Pams.Data",
  "Pams.Data.csproj",
);

execFileSync("dotnet", ["restore", projectFile], {
  stdio: "inherit",
});

execFileSync("dotnet", ["build", projectFile], {
  stdio: "inherit",
});
```

## AI Coding Instructions

- Keep the `EntityFramework` dependency declaration in `Pams.Data.csproj`.
- Restore NuGet packages before building projects that reference `Pams.Data`.
- Treat this as a legacy-format package dependency when updating project configuration.
- Check dependent data-access code before changing or removing the package reference.

## Used by

2 references from 2 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.Data` — `Pams/Data/Pams.Data/Pams.Data.csproj`:1
