Introduction: What is Entity Framework Core?

Entity Framework Core is an evolution of Microsoft's object-relational mapper (ORM), which has been around since 2000. It is also known as EF Core. EF Core is Microsoft's official cross-platform data access framework for .NET Development means it can run on Windows, Linux, and Mac. EF Core is open-source, lightweight, and a very powerful ORM ( object-relational mapping )

EF Core enhances developer productivity. EF Core has a mapping layer in between, allowing the table from an object. EF Core allows us to connect with many databases engines.

Brief about Entity Framework Core:

  • What is ORM?
  • Which Databases are supported by Entity Framework Core?
  • Which types of applications are supported by Entity Framework Core?
  • EF Core development approaches.

What is ORM?  

ORM (object-relational mapping) allows us to express our database queries using our application classes, then ORM builds and executes SQL queries for us. In other words, the breakup of ORM means as given below:

  • The Object part is the one we use with our programming language ( C# or Java ).
  • The Relational part is a Relational Database Management System ( RDBMS ) some most popular RDBMS are Oracle, MS-SQLServer, MySQL, PostgresSQL.
  • And the Mapping part is where we make a  bridge between our objects and our database tables.

Hence ORM allows us to store, update and delete data into the database.

Which Databases are supported by Entity Framework Core?

EF Core is supported by all the major databases. Entity Framework Core is used in many different databases by using plugins (from NuGet) called database providers. Below list of some different database providers:

Package NameDatabase EngineMaintainer
SQL Server 2012 and above
SQLite 3.7 and above
Npgsql Development Team
MySQL, MariaDB
Pomelo Foundation

There are many more other database providers, but I have listed those that are very popular database engines.

Which types of Applications are supported by EF Core?

Below is the list of different types of dotnet applications, which are supported by Entity Framework Core.

  • ASP.NET Web Forms (framework 4.5+)
  • ASP.NET Core (MVC / Razor Pages)
  • Web API
  • Console Application
  • Windows Application
  • WPF
  • Xamarin Framework

Entity Framework Core Development Approach

EF Core supports 2 development approaches and that is:

  1. Code First Approach.
  2. Database First Approach.

Code First Approach, means when we develop the application, we write our application object code first before we write database code. In short, we first create domain classes in our application, and then with EF Core magic, it creates the database and all tables using migration based on our application domain classes. This approach is also called Data-Driven Design.

Whereas in Database First Approach, EF Core creates domain and context classes in our application from the given existing database. Till now EF Core has limited support for the database first approach i.e there is no visual designer support like the .edmx file. We will understand both these approaches in more depth in our further article on Entity Framework Core.

In next chapter will learn the step-by-step process of how to install Entity Framework Core in the Core application.

PS: If you found this content valuable and want to thank me? 👳 Buy Me a Coffee