Entity Framework Core also known as EF Core is the latest version of Microsoft’s Entity Framework. It is an Object Relational Mapping (O/RM) framework, an enhanced version of ADO.NET, that automates data storage and retrieval from the database. EF Core is open source, cross-platform, lightweight, extensible and very powerful in nature. It is also very easy to learn and use in our DOT NET Projects.
We can use Entity Framework Core on all DOT NET applications like :
EF Core Version | Release Date |
---|---|
EF Core 8.0 | November 2023 |
EF Core 7.0 | November 2022 |
EF Core 6.0 | December 2021 |
EF Core 5.0 | November 2020 |
EF Core 3.1 | December 2019 |
EF Core 2.0 | August 2017 |
EF Core 1.1 | November 2016 |
EF Core 1.0 | June 2016 |
Entity Framework Core is the highly enhanced version of Entity Framework and contains a lot more features. It was released in the year 2016 when DOT NET Core came into existence. Entity Framework has a visual designer tool called .edmx file which describes the database and the models along with the mappings between them. Entity Framework Core does not have a visual designer tool. All the models and mappings are created in C# classes. Entity Framework is no longer actively developed by Microsoft so use only Entity Framework Core in your projects.
There are 2 Entity Framework Core develpment approaches which we can follow. These are:
There is very little support of Database First approach since there is no visual designer, like .edmx file, in EF Core. The EF Core mainly supports Code First approach.
In Database First approach the domain & context classes are created based on the existing Database.
In Code First approach the domain & context classes are created by you then EF Core created the database using these classes. The term Migration is used whenever EF Core creates or updates the Database based on the domain & context classes.
Some important features of EF Core are:
Entity Framework Core works on many databases like:
1. SQL Server
2. MySQL
3. PostgreSQL
4. SQLite
5. SQL Compact
6. Firebird
7. Oracle
8. Db2
9. MongoDB