Learning Entity Framework (Day 4): Understanding Entity Framework Core and Code First Migrations in EF Core


Introduction

In the previous articles (data access approachcode first approach, and WebAPI) we learned a lot about the Entity Framework and its practical implementations. The intent of this article is to explain the concept of Entity Framework core. We’ll go step by step to explore the topic of Entity Framework core. We’ll explore the code first approach using EF Core and learn about data annotations as well. We’ll also cover code first migrations in this article along with an understanding of how to seed the database. I’ll use Visual Studio 2017 for the tutorial. For the database, we would be using SQL Server. You can make use of local dB if you do not have SQL server installed.

Continue reading “Learning Entity Framework (Day 4): Understanding Entity Framework Core and Code First Migrations in EF Core”
Advertisements

Learning Entity Framework (Day 3): Learning Web API 2 With Entity Framework 6 Code First Migrations


Introduction

In the last article of learning Entity Framework, we learned about the code-first approach and code-first migrations. In this article, we’ll learn how to perform CRUD operations with ASP.NET Web API2 and Entity Framework. We’ll go step by step in the form of a tutorial to set up a basic Web API project and we’ll use the code-first approach of Entity Framework to generate the database and perform CRUD operations. If you are new to Entity Framework, follow my previous articles explaining data access approaches with Entity Framework. The article would be less of a theory and more practical so that we get to know how to set up a Web API project using Entity Framework and perform CRUD operations. We’ll not create a client for this application but rather use Postman; i.e., the tool to test the REST endpoints.

Continue reading “Learning Entity Framework (Day 3): Learning Web API 2 With Entity Framework 6 Code First Migrations”

Learning Entity Framework (Day 2): Code First Approach and Code First Migrations in Entity Framework


Introduction

The intent of this article is to explain the code first approach and code first migrations that Microsoft’s Entity Framework provides. In my last article, I explained the theory behind the Entity Framework and the other two approaches, i.e., database first and model first approach. We’ll go step by step to explore the code first approach via which we can access the database and data using Entity Framework in our application. I’ll use Entity Framework version 6.2 and .NET Framework 4.6. and Visual Studio 2017 for the tutorial. For the database, we would be using SQL Server. You can make use of local database if do not have SQL Server installed.

Continue reading “Learning Entity Framework (Day 2): Code First Approach and Code First Migrations in Entity Framework”

Learning Entity Framework (Day 1): Data Access Approaches of Entity Framework in .NET


Introduction

The intent of this article is to explain the three data access approaches that Microsoft’s Entity Framework provides. There are several good articles on the internet on this topic but I would like to cover this topic in a more detailed way and in the form of a tutorial that would be a primer for someone who is starting to learn Entity Framework and its approaches. We’ll go step by step to explore each approach via which we can access the database and data using EF in our application. I’ll use Entity Framework version 6.2, .NET 4.6, and Visual Studio 2017 for the tutorial. For the database, we would be using SQL Server. You can make use of a local DB if you do not have SQL Server installed. I’ll explain the database first and model first approaches in this article; while the code first approach and code first migrations will be used in the following article.

Continue reading “Learning Entity Framework (Day 1): Data Access Approaches of Entity Framework in .NET”

Diving Into Microsoft .NET Entity Framework


#FreeBook

Introduction:

In this book, you will learn about the basics of Entity Framework and the three data access approaches that Microsoft’s Entity Framework provides. This book covers the introduction to Entity Framework, how Entity Framework’s capabilities could be leveraged in .Net development irrespective of the type of application used, the key features of Entity Framework.

Continue reading “Diving Into Microsoft .NET Entity Framework”