© Les Jackson 2020
L. JacksonThe Complete ASP.NET Core 3 API Tutorialhttps://doi.org/10.1007/978-1-4842-6255-9_5

5. The “C” in MVC

Les Jackson1 
Melbourne, VIC, Australia

Chapter Summary

In this chapter we’ll go over some high-level theory on the Model–View–Controller (MVC) pattern, detail out our API application architecture, and start to code up our API controller class.

When Done, You Will

  • Understand what the MVC pattern is

  • Understand our API application architecture, including concepts such as
    • Repositories

    • Data transfer objects (DTOs)

    • Database contexts

  • Add a controller class to our API project.

  • Create a Controller Action (or API Endpoint if you prefer) that returns “hard-coded” JSON.

  • Place our solution under source control.

Quick Word on My Dev Setup ...

Get The Complete ASP.NET Core 3 API Tutorial: Hands-On Building, Testing, and Deploying now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.