Kind: Class
Source: Pams/Data/Pams.Data/PamsLinq5.designer.cs (line 26)
Part of: Pams
PamsLinqDataContext is a LINQ to SQL data context generated in Pams/Data/Pams.Data/PamsLinq5.designer.cs. It exposes table mappings for lookup and audit entities, allowing application code to query and persist records such as currencies, document types, nationalities, and database logs.
Diagram
mermaidgraph LR Context[PamsLinqDataContext] Context --> Currencies[Currency] Context --> DBLogs[DBLog] Context --> DBLogUsers[DBLogUser] Context --> DocumentTypes[DocumentType] Context --> EmailAddressTypes[EmailAddressType] Context --> Genders[Gender] Context --> Nationalities[Nationality] Context --> PhoneNumberTypes[PhoneNumberType] Context --> ReasonTypes[ReasonType] Context --> SerialTypes[SerialType]
Usage
tstype Currency = {
id: string;
code: string;
name: string;
};
async function loadCurrencies(): Promise<Currency[]> {
const response = await fetch("/api/lookups/currencies");
if (!response.ok) {
throw new Error("Unable to load currencies.");
}
return response.json();
}
const currencies = await loadCurrencies();
console.log(currencies.map((currency) => currency.code));
AI Coding Instructions
- Treat
PamsLinqDataContextas the database boundary for LINQ to SQL queries and updates. - Query lookup tables such as
Currencies,Genders, andNationalitiesthrough their mappedTable<T>members. - Keep changes to
PamsLinq5.designer.cslimited; regenerate the designer file when the database mapping changes. - Submit pending inserts, updates, and deletes through the data context's change submission flow.
- Avoid exposing LINQ entity types directly to JavaScript clients; map them to API response models.
Relationships
- IMPORTS →
Comment - IMPORTS →
Status
Used by
353 references from 353 files. Each is a place in this repository where the symbol is actually used — go read one rather than trusting an example.
Imported by (353)
FilesController—Pams/API/Pams.API/Controllers/Common/FilesController.cs:27UnitOfWork—Pams/Logic/Pams.Business/Component/UnitOfWork.cs:12EndUser—Pams/Logic/Pams.Business/Domain/Import/ImportDomain.cs:3891AccountManagerTarget—Pams/Logic/Pams.Business/Entity/BookingTarget/AccountManagerTarget.cs:7ForecastedBookingRule—Pams/Logic/Pams.Business/Entity/BookingTarget/ForecastedBookingRule.cs:7MonthlyBacklog—Pams/Logic/Pams.Business/Entity/BookingTarget/MonthlyBacklog.cs:7MonthlyForecast—Pams/Logic/Pams.Business/Entity/BookingTarget/MonthlyForecast.cs:7MonthlyProductTypeBacklog—Pams/Logic/Pams.Business/Entity/BookingTarget/MonthlyProductTypeBacklog.cs:7
…and 345 more.
Was this page helpful?