Getting started with EntityFramework
EF is an ORM tool that helps to design your persistence layer quickly. Now you can ask but why ? we already had ado.net and it was doing well, but wait and think wouldn't it be great if you can think and treat your database in terms of classes and objects. where your table is a class its columns are properties and each row is an object, now as a developer, you can play with it. That is the role of any ORM and Entity framework is just an ORM that's it.
There are three different workflows of Entity Framework, Like database first, code first and model first, each workflow helps us to design our domain model. Creating a persistence framework with Ado.Net was time-consuming and hectic, we had to manage the connections, we had to write SQL Commands and Execute them on the server using command class methods like ExecuteReader(), ExecuteNonQuery() or ExecuteScalar() but with entity framework, we don't need to think about any of these things we can just focus on our code, we just play with collections and object, we fetch data from in-memory collection and add data to the in-memory collection, Entity Framework takes care of all the rest of the things like managing the connection and executing necessary T-SQL command, etc.
With Entity Framework, we can do everything that we could do on a SQL Server database like calling a Stored Procedure or Views creating tables, altering them, or executing any DML queries against SQL server.
Nowadays almost every company uses Entity Framework, so having its knowledge becomes necessary. But Don't worry we will learn each and every concept of Entity Framework in great detail with examples