Kind: Class
Source: Pams/Logic/Pams.Business/Entity/Common/Address.Model.cs (line 15)
Part of: Pams
Address is a C# entity model that stores address, destination, and location details for a record in the PAMS business layer. It includes identity fields, optional company ownership through CompanyId, and address components used by application and API layers.
Diagram
mermaidgraph LR Address[Address] Address --> AddressID["AddressID: long"] Address --> AddressLine["AddressLine: string"] Address --> CountryCode["CountryCode: string"] Address --> CompanyId["CompanyId: int?"] Address --> City["City: string"] Address --> State["State: string"] Address --> PostalCode["PostalCode: string"] Address --> ZipCode["ZipCode: string"] Address --> RowGuid["RowGuid: Guid"] Address --> Destination["Destination: string"]
Usage
tstype AddressPayload = {
AddressID: string;
AddressLine: string;
CountryCode: string;
CompanyId: number | null;
City: string;
State: string;
PostalCode: string;
ZipCode: string;
RowGuid: string;
Destination: string;
};
async function saveAddress(address: AddressPayload) {
await fetch("/api/addresses", {
method: "POST",
headers: {
"Content-Type": "application/json",
},
body: JSON.stringify(address),
});
}
const address: AddressPayload = {
AddressID: addressId,
AddressLine: "Example Street",
CountryCode: "US",
CompanyId: null,
City: "Example City",
State: "Example State",
PostalCode: "Example Postal Code",
ZipCode: "Example Zip Code",
RowGuid: rowGuid,
Destination: "Primary",
};
await saveAddress(address);
AI Coding Instructions
- Preserve the existing property names and casing when mapping
Addressto API request and response payloads. - Treat
CompanyIdas nullable and sendnullwhen no company value is available. - Follow the API serialization contract for
AddressIDandRowGuid; do not assume JavaScript numeric handling matches C#long. - Keep
PostalCodeandZipCodeseparate unless the calling API explicitly maps them together.
Relationships
- IMPORTS →
Address - IMPORTS →
EntityBase - IMPORTS →
City - IMPORTS →
PamsLinqDataContext
Used by
12 references from 12 files. Each is a place in this repository where the symbol is actually used — go read one rather than trusting an example.
Imported by (12)
AddressController—Pams/API/Pams.API/Controllers/Common/AddressController.cs:15CompanyBranchController—Pams/API/Pams.API/Controllers/Organization/CompanyBranchController.cs:21CompanyController—Pams/API/Pams.API/Controllers/Organization/CompanyController.cs:26EmployeeController—Pams/API/Pams.API/Controllers/Person/EmployeeController.cs:29AccountsController—Pams/API/Pams.API/Controllers/Person/AccountsController.cs:23PersonAddressController—Pams/API/Pams.API/Controllers/Person/PersonAddressController.cs:21ActivitiesController—Pams/API/Pams.API/Controllers/Tasks/Activities/ActivitiesController.cs:17BranchViewModel—Pams/API/Pams.API/Models/ViewModels/Branch/BranchViewModel.cs:11
…and 4 more.
Was this page helpful?