Chapter Summary
In this chapter we’re going to introduce “data” to our API, so we’ll begin our journey with our Model and Repository classes.
When Done, You Will
Understand what a “Model” class is and code one up.
Define our Repository Interface, and implement a “mock” instance of it.
Understand how we use Dependency Injection to decouple interfaces from implementation.
Our Model
OK so we’ve done the “Controller” part of the MVC pattern (well a bit of it; it’s still not fully complete – but the groundwork is in), so let’s turn our attention to the Model part of the equation. ...