4. The shop's own data
Trax keeps its records in its own schema, trax. Shopfront's own data, what it sells, how many of
each it has and the orders customers placed, has lived in a dictionary and nowhere at all. In this
chapter Shopfront gets a schema of its own beside Trax's, shop, with products and orders, and
PlaceOrder reserves stock and stores each confirmed order there.
This chapter starts from the end of chapter 3. It uses the same Postgres container.
In this chapter
- One context, one schema
- Packages
- The models
- The context and its interface
- The catalogue reads the database
- Two orders, one T-shirt
- Register the context and create its schema
- Run it
- Test against a real database
SDK Reference
DomainDataContext | EnsureSchemaCreatedAsync | Add a domain data context | IFailureClassifier | Architecture guards