Chapter 3: Introducing Entity Framework Core

In this chapter, we will go through Entity Framework and create a database where we can store our blog posts. Since most applications use data in one form or another, the goal of this chapter is to be able to use data from our database in our Blazor application. We will also create an API to access the data.

By the end of this chapter, we will have learned how to use the .NET CLI to create a new project, add new NuGet packages, and create migrations.

In this chapter, we will cover the following:

  • Creating a data project
  • Adding DbContext to Blazor

Technical requirements

Make sure you have followed the previous chapters, or use the Ch2 folder as the starting point.

In this chapter, we will create a ...

Get Web Development with Blazor now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.