Share via


Domain Relationships in the Generated API

This topic describes the typical generated API for a ___domain relationship. You use ___domain relationships to create links between ___domain classes. This example uses the file Library.dsl, which you can create by following the steps in Walkthrough: Creating a Generated API.

PersonChecksOutCirculationBooks

The PersonChecksOutCirculationBooks ___domain relationship represents a member of a library who has checked out a circulation book. The ___domain relationship has a DueDate ___domain property that indicates when the member should return the book.

PersonChecksOutCirculationBooks Constructors

Initializes a new instance of the PersonChecksOutCirculationBooks ___domain relationship.

This constructor takes the Person and CirculationBook parameters and creates a PersonChecksOutCirculationBooks link between them.

public PersonChecksOutCirculationBooks(Person source, CirculationBook target);
public PersonChecksOutCirculationBooks(Partition partition, params RoleAssignment [] roleAssignments);
public PersonChecksOutCirculationBooks(Store store, params RoleAssignment[] roleAssignments);
public PersonChecksOutCirculationBooks(Partition partition, RoleAssignment [] roleAssignments, PropertyAssignment [] propertyAssignments);
public PersonChecksOutCirculationBooks(Store store, RoleAssignment[] roleAssignments, PropertyAssignment [] propertyAssignments);

GetCirculationBooks

Gets a list of all instances of the CirculationBook ___domain class that are linked to the Person ___domain class through the PersonChecksOutCirculationBooksdomainrelationship.

public static LinkedElementCollection<CirculationBook> GetCirculationBooks(Person element);

Gets the PersonChecksOutCirculationBooks link between a Person ___domain class and a CirculationBook ___domain class.

public static PersonChecksOutCirculationBooks GetLink(Person source, CirculationBook target);

Gets any PersonChecksOutCirculationBooks links between a Person ___domain class and a CirculationBook ___domain class.

public static ReadOnlyCollection<PersonChecksOutCirculationBooks> GetLinks(Person source, CirculationBook target);

GetLinksToCirculationBooks

Gets the list of PersonChecksOutCirculationBooks links to a specific instance of the Person ___domain class.

public static ReadOnlyCollection<PersonChecksOutCirculationBooks> GetLinksToCirculationBooks(Person personInstance);

GetLinkToPerson

Gets the PersonChecksOutCirculationBooks link to an instance of the CirculationBook ___domain class.

public static PersonChecksOutCirculationBooks GetLinkToPerson(CirculationBook circulationBookInstance);

GetPerson

Gets the instance of the Person ___domain class for a PersonChecksOutCirculationBooks link.

public static Person GetPerson(CirculationBook element);

SetPerson

Sets the instance of the Person ___domain class for a PersonChecksOutCirculationBooks link to a specified person.

public static void SetPerson(CirculationBook element, Person newPerson);

CirculationBook

Gets or sets the instance of the CirculationBook ___domain class.

DueDate

Gets or sets the value of the DueDate ___domain property. DueDate is of type System.DateTime.

Note

DueDate is a CustomStorage property. For this type of property, the value is obtained in some other way than with a simple property value.

Person

Gets or sets an instance of the Person ___domain class.

CirculationBookDomainRoleId

The ID of the role that is assigned to theCirculationBook ___domain class.

DomainClassId

The ID that is assigned to the PersonChecksOutCirculationBooks ___domain relationship.

DueDateDomainPropertyId

The ID that is assigned to theDueDate ___domain property.

PersonDomainRoleId

The ID of the role that is assigned to thePerson ___domain class.

See Also

Concepts

Functionality of the Generated API

Understanding Generated Properties and Methods

Reference

Partition

Store

RoleAssignment

PropertyAssignment

LinkedElementCollection<T>

Other Resources

Domain-Specific Language Tools Glossary