Kind: Service
Source: Pams/API/Pams.API/Pams.API.csproj (line 1)
Part of: Pams
NuGet package dependency
EntityFramework is a NuGet package dependency declared by the Pams.API project. It provides the legacy Entity Framework data-access runtime used by the API to query and persist application data.
Diagram
mermaidsequenceDiagram participant API as Pams.API participant EF as EntityFramework participant DB as Database API->>EF: Create data context EF->>DB: Query or save entities DB-->>EF: Return data or result EF-->>API: Materialize entities or report status
Usage
ts// Entity Framework is consumed by the Pams.API .NET project.
// JavaScript clients call API endpoints that use Entity Framework internally.
const response = await fetch("/api/patients/42");
if (!response.ok) {
throw new Error("Unable to load patient data");
}
const patient = await response.json();
console.log(patient);
AI Coding Instructions
- Keep
EntityFrameworkpackage references inPams.API.csprojaligned with the API's existing .NET target and dependency format. - Use the existing Entity Framework data context and entity mappings rather than creating parallel database access code.
- Treat Entity Framework as a server-side dependency; browser TypeScript and JavaScript should access data through API endpoints.
- Check query behavior, entity tracking, and database migrations before changing persistence-related code.
Was this page helpful?