Delete Records in Entity Framework Core

Last Updated: October 15, 2018

delete records ef core

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…)

Update Records in Entity Framework Core

Last Updated: October 13, 2018

update records ef core

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…)

Read Records in Entity Framework Core

Last Updated: October 5, 2018

read records ef core

Reading data from database in Entity Framework Core is quite easy. The below code will load the employee with name ‘Matt’. (more…)

Insert Records in Entity Framework Core

Last Updated: October 12, 2018

insert records ef core

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…)

Migrations in Entity Framework Core

Last Updated: August 24, 2018

migrations ef core

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…)

Code-First Approach in Entity Framework Core

Last Updated: August 8, 2018

code first approach ef core

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 in Entity Framework Core

Last Updated: July 28, 2018

dbcontext class

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…)

Database-First approach in Entity Framework Core

Last Updated: July 28, 2018

database first approach

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…)

Installation of Entity Framework Core

Last Updated: June 30, 2018

install entity framework core

In this tutorial you will learn how to install Entity Framework Core on your project. (more…)

Introduction to Entity Framework Core

Last Updated: June 29, 2018

introduction entity framework core

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…)