Kind: Class
Source: Pams/Logic/Pams.Business/Entity/EntityBase.cs (line 103)
Part of: Pams
EntityBase is a shared model class that tracks whether an entity has an associated object through HasObject and whether it is marked for deletion through MarkDeleted. Business-layer entity types can inherit or compose this state when applying persistence and deletion rules.
Diagram
mermaidgraph LR Entity[EntityBase] HasObject[HasObject: bool] MarkDeleted[MarkDeleted: bool] Entity --> HasObject Entity --> MarkDeleted MarkDeleted --> DeletionFlow[Deletion handling] HasObject --> ObjectState[Associated object state]
Usage
ts// TypeScript representation of the EntityBase state sent to or received from .NET.
type EntityBase = {
HasObject: boolean;
MarkDeleted: boolean;
};
const entity: EntityBase = {
HasObject: true,
MarkDeleted: false,
};
function shouldPersist(entity: EntityBase): boolean {
return entity.HasObject && !entity.MarkDeleted;
}
if (shouldPersist(entity)) {
console.log("Entity can be processed.");
}
AI Coding Instructions
- Keep
HasObjectandMarkDeletedas boolean state fields when extending entity models. - Treat
MarkDeletedas deletion state; do not assume the entity has already been removed from storage. - Check
HasObjectbefore performing operations that require an associated object. - Preserve field names when mapping this model to API payloads or client-side TypeScript types.
Used by
355 references from 355 files. Each is a place in this repository where the symbol is actually used — go read one rather than trusting an example.
Imported by (355)
PersonUserBindingModel—Pams/Logic/Pams.Business/BindingModels/Security/PersonUserBindingModel.cs:7AccountManagerTarget—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:7MonthlySalesForecast—Pams/Logic/Pams.Business/Entity/BookingTarget/MonthlySalesForecast.cs:7MonthlyTarget—Pams/Logic/Pams.Business/Entity/BookingTarget/MonthlyTarget.cs:7
…and 347 more.
Was this page helpful?