Summary
To summarize this chapter, we have covered that entities represent domain models in an application, and we write entities in the domain layer of the application.
We've also covered EF Core, which helps developers persist and query data from the database without using SQL queries through an O/RM.
We've learned that DbContext
of Entity Framework is an interface of the database and has DbSet
representing a table in the database.
And lastly, we've written two controllers with DbContext
and tested them by sending HTTP requests through Swagger UI.
You now have the skills to handle any HTTP requests sent by any client-side applications and process and save them in any type of relational database using EF Core.
In the next chapter, we will learn how to write maintainable and testable code using CQRS, or Command and Query Responsibility Segregation. So, see you later.