From the course: Using Entity Framework Core with Legacy Databases

Why Entity Framework Core for an existing database?

From the course: Using Entity Framework Core with Legacy Databases

Start my 1-month free trial

Why Entity Framework Core for an existing database?

- [Instructor] Let's see why I chose Entity Framework Core for our legacy database. We'll start with a definition of Entity Framework Core from their documentation website. Entity Framework Core is an object-relational mapper that enables .NET developers to work with a database using .NET objects. It eliminates the need for most of the data-access code that developers usually need to write. Obviously writing less code is something that I always like to do as a developer, but let's talk about what it means to be an object-relational mapper. Objects are the language of code and relationships are the language of databases. Objects are how we organize data in code and relationships are how we organize data in databases. We need to be able to freely flow from relationships to objects and back again to effectively write data-centric applications. We need a bridge between the two. You can do this with a lot of code or a little bit of code. Entity Framework is one way to do this with a minimum amount of code, but what makes Entity Framework Core special over other ORMs? Entity Framework has been around for a while. A lot of previous versions of Entity Framework means that the syntax has had a lot of time to evolve, but Entity Framework Core is also a complete rewrite of Entity Framework, allowing the writers of Entity Framework Core to start with a clean state. But Entity Framework Core has much smarter SQL generation than previous versions of Entity Framework. Entity Framework Core is also open source, which means that if there's a bug or an issue, you can look at the source code. It also means that you can contribute to Entity Framework Core yourself if you're so inclined. Finally, Entity Framework Core has a wide array of platform options that we talked about in a previous video.

Contents