In the previous articles (data access approach, code 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”
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”