Compartir a través de


Working with Domain Properties

Elements in a domain model have domain properties, which you can use to extract metadata from that domain model. There are three kinds of domain properties, as listed in the following table:

Domain Property Kind

Description

Standard

A domain property that is saved in the store and serialized to file.

Calculated

A domain property that is not saved in the store and for which the Get accessor must be set. Typically, Get calculates the value from other domain properties.

CustomStorage

A domain property that is not saved in the store and for which both the Get and Set accessors must contain supplied values. Typically, Get calculates the value from other domain properties, and Set modifies other domain properties.

Nota

In the Library domain model, AmountOwed is a calculated property whose value is the sum of all overdue fines for a library member. The calculated property DueDate is set by retrieving the current date from an external location. To learn more about the Library domain model, see Overview of Library.dsl.

Changing the Value of a Domain Property

As with all changes to the store, changes to standard domain properties must be done in a transaction. Domain-Specific Language Tools tracks any changes that are made to a domain property so that these changes can be canceled if the transaction is not committed or undone.

See Also

Concepts

Common Tasks with Domain Models

Overview of Library.dsl

Domain-Specific Language Tools Glossary