Getting started with Entity Framework Core
In this section, we will create a simple console application to perform CRUD operations using Entity Framework Core. The intent is to get started with EF Core and understand how to use it. Before we dive into coding, let us see the two development approaches that EF Core supports:
- Code-first
- Database-first
These two paradigms have been supported for a very long time and therefore we will just look at them at a very high level. EF Core mainly targets the code-first approach and has limited support for the database-first approach, as there is no support for the visual designer or wizard for the database model out of the box. However, there are third-party tools and extensions that support this. The list of third-party tools and extensions can be seen at https://docs.microsoft.com/en-us/ef/core/extensions/.
In the code-first approach, we first write the code; that is, we first create the domain model classes and then, using these classes, EF Core APIs...