Question 5 of 10Pro Only
What is the Repository pattern, and how does it differ from the Active Record pattern? When would you choose one over the other?
Sample answer preview
## Active Record Pattern In the Active Record pattern, domain objects directly handle their own persistence. Each object knows how to save, update, and delete itself in the database. ### Characteristics - Model class contains both data and database operations.
Repository patternActive Recorddata access layerpersistenceDomain-Driven Designseparation of concerns