So far, we have seen how we can use Entity Framework with an existing database using the Entity Framework Code First approach. The other end of the spectrum is to see how we can design our application domain models in such a way that we can use Entity Framework to persist the domain entity's data in the database. This can be done using the Entity Framework Code First approach.
Tip
The same can also be achieved using the Entity Framework Model First approach. The only difference in the Code First approach is that we will be using Visual Entity Designer instead of writing our entity Plain Old CLR Objects (POCOs) classes ourselves. Conceptually, both these approaches will be similar, and thus in this chapter, we will discuss the Code First approach.