Share via


Domain Classes in the Generated API

This topic describes the classes in the generated API for the Book elements in a Library domain model. This example uses the file Library.dsl, which you can create by following the steps in Walkthrough: Creating a Generated API.

Note

This topic is not a complete reference. However, it shows you what kinds of functionality are available for your domain-specific language solution.

Book Class

Represents a book in the model that Library.dsl describes.

Book is an abstract class.

Book Constructor

Initializes a new instance of the Book domain class.

protected Book(Partition partition, PropertyAssignment[] propertyAssignments);

Library Property

Gets or sets the Library property for this member of the Book domain class.

public virtual Library Library { get; set; };

DomainClassId Property

Gets the domain class ID for Book.

This static property indicates the ID of the Book domain class. By using this property, you can access the metadata of the Book domain class from any instance of a book. For more information, see DomainClassInfo.

public static readonly Guid DomainClassId;

CirculationBook Class

Represents a derived class of Book that a member of the Person domain class can check out.

You can override any methods that this empty partial class inherits from the CirculationBookBase class.

CirculationBook Constructor

Initializes a new instance of the CirculationBook domain class.

public CirculationBook(Partition partition, PropertyAssignment[] propertyAssignments);

DomainClassId Property

Gets the domain class ID for CirculationBook.

public static readonly Guid DomainClassId;

CirculationBookBase Class

This base class is for the CirculationBook domain class.

This abstract class is generated when the HasDoubleDerived property is true for the CirculationBook domain class.

Library Property

Gets or sets the Library property that contains this CirculationBookBase domain class.

public override Library Library { get; set; }

Person Property

Gets or sets the Person property, which identifies who checks out this member of the CirculationBookBase domain class.

public virtual Person Person { get; set; }

ReferenceBook Class

Represents a reference book in the Library model. ReferenceBook is an abstract class.

ReferenceBook Constructors

Initializes a new instance of the ReferenceBook class.

protected Book(Partition partition, PropertyAssignment[] propertyAssignments);
protected Book(Store store, PropertyAssignment[] propertyAssignments);

Library Property

Gets or sets the Library property for this member of the ReferenceBook class.

public virtual Library Library { get; set; };

DomainClassId Property

Gets the domain class ID for ReferenceBook.

This static property indicates the ID of the ReferenceBook domain class. By using this property, you can access the metadata of the ReferenceBook domain class from any instance of that class. For more information, see DomainClassInfo.

public static readonly Guid DomainClassId;

See Also

Concepts

Library.Dsl Overview

Understanding Generated Properties and Methods

Functionality of the Generated API

Reference

PropertyAssignment

Partition

Other Resources

Domain-Specific Language Tools Glossary