Tutorial

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

  1. One context, one schema
  2. Packages
  3. The models
  4. The context and its interface
  5. The catalogue reads the database
  6. Two orders, one T-shirt
  7. Register the context and create its schema
  8. Run it
  9. Test against a real database

SDK Reference

DomainDataContext | EnsureSchemaCreatedAsync | Add a domain data context | IFailureClassifier | Architecture guards


Next: 4.1 One context, one schema