Share via


Functionality of the Generated API

When you transform all text templates for a domain model, you automatically generate .cs files that contain the class definitions for your domain-specific language. Elements such as domain classes, domain relationships, and domain models represent your generated class definitions, also known as the generated API.

The following sections contain brief overviews of the domain classes that you generated if you followed the steps in Walkthrough: Creating a Generated API. For information about how these domain classes and their domain relationships work together, see Library.Dsl Overview.

DomainModel.cs

This file contains the domain model class and the closure classes, which calculate the associated elements when an element is deleted or copied. The domain model class communicates to the store about the structure of the domain model. This class also provides generic methods for creating model objects, links, and generated code for any enumerations that are defined in your domain model.

This file contains the following domain model class and closure classes:

  • LibraryModel (domain model class)

  • LibraryModelDeleteClosure (delete closure)

  • LibraryModelCopyClosure (copy closure)

DomainClasses.cs

This file contains all of the domain classes in the model:

  • Library

  • Book

  • CirculationBook (derived from Book)

  • ReferenceBook (derived from Book)

  • Person

DomainRelationships.cs

This file contains all of the domain relationships in the model:

  • LibraryHasMembers

  • LibraryHasBooks

  • LibraryHasCirculationBooks (derived from LibraryHasBooks)

  • LibraryHasReferenceBooks (derived from LibraryHasBooks)

  • PersonChecksOutBooks

See Also

Tasks

Walkthrough: Creating a Generated API

Concepts

Library.Dsl Overview

Other Resources

Domain-Specific Language Tools Glossary