EF Core API builds and executes the DELETE statement in the database for the entities whose EntityState is set as ‘Deleted’. The method DbContext.Remove() is used for deleting entity. (more…)
The Entity Framework Core executes UPDATE statement in the database for the entities whose EntityState is Modified. The DbContext tracks of all entities and those that are modified it sets there EntityState as modified. (more…)
Reading data from database in Entity Framework Core is quite easy. The below code will load the employee with name ‘Matt’. (more…)
CRUD Operations can be easily performed by Entity Framework Core. EF Core executes Insert Operation for the entities whose EntityState is Added when the DbContex.SaveChanges() method is called. (more…)
Using Migrations you can keep the database synchronized with the domain (entity) classes. When developing a project the programmers keep on updating the entity classes. Therefore they need to run migrations to keep the database schema up to date. Migration commands can be execute in NuGet Package Manager Console or in dotnet Command Line Interface (CLI). (more…)
In Code-First approach you create the entity classes only. Then with migration commands the EF Core creates the database based on these entity classes. (more…)
DbContext class is the brain of Entity Framework Core, using it you can do all the communications with the database. It allows performing the following tasks: (more…)
In Database-First approach the entity and context classes are automatically created by the EF Core from the database. So this means you have first create your database for the EF Core. (more…)
In this tutorial you will learn how to install Entity Framework Core on your project. (more…)
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 very powerful and also very easy to learn and use in your projects. (more…)