Compartir a través de


Overview of Library.dsl

To help illustrate the generated API, the Library sample includes a real-world domain model, in which people can come to a library to read or to check out books. The library offers circulating books (which people can check out) and reference books (which people can read only in the library). If a person checks out a circulating book, the person must return it by a specific date. If the person does not return the book by that date, the person owes the library a fine.

In the following illustration, the library, person, and book objects represent domain classes in the domain model. The reference book domain class and the circulating book domain class are derived from the book domain class. Each domain class has one or more domain relationships with other domain classes. In this case, the library and person domain classes share a relationship, and the library and books domain classes share another relationship.

Diagram of the Library Domain Model

The Library domain model contains the following domain classes:

  • Library

  • Book

  • CirculationBook (derived from Book)

  • ReferenceBook (derived from Book)

  • Person

The Library domain model contains the following domain relationships:

  • LibraryHasMembers

  • LibraryHasBooks

  • LibraryHasCirculationBooks (derived from LibraryHasBooks)

  • LibraryHasReferenceBooks (derived from LibraryHasBooks)

  • PersonChecksOutBooks

See Also

Concepts

Walkthrough: Creating a Generated API

Functionality of the Generated API

Domain-Specific Language Tools Glossary