ASP.NET Core MVC with Entity Framework Core

by Mark Mahoney

This book is a short introduction to ASP.NET Core with Entity Framework Core. I used these examples in a database course I taught recently. Most of my students in the course had never created .NET web apps before. All of them had some experience with C++ but most did not have C# experience. I start by giving a brief demo of C# for C++ programmers. Next, I create a simple ASP.NET web app for generating random rolls of dice. There is no data component in this dice app. Then I create an ASP.NET web app using Entity Framework Core to hold students in a database. I use EF Core to create student objects and store them persistently. Finally, I create a more significant EF Core app that has multiple interconnected models. The app is for a fictional movie theater chain to sell tickets to customers and see information about past showings. I used Visual Studio to create these apps. The reader should be able to follow along and recreate these apps on their machine. I suggest doing that to become familiar with the tools.