Accessing Existing Databases with Entity Framework Core

Accessing Existing Databases with Entity Framework Core

image description

Course Description

Not every .NET development project starts from scratch. Often you're rewriting applications to take advantage of different data sources, or to make connections to legacy data in more efficient ways. Entity Framework (EF) plays extremely well with existing databases, and it can generate some of the data-access code for you automatically. Using the practical techniques shown in this course, you will be able to use EF Core with existing relational databases, and modify the generated code as necessary. Richard Goforth shows how to connect to a database, scaffold a model from it, and begin improving on that model. He uses shadow properties, backing fields, inheritance relationships, concurrency tokens, and other techniques to best map a database to an application. No matter how untidy your tables and fields, EF will help you write clean, cross-platform code that is easy to maintain in the long run

What you will learn

Setting up your project Connecting to a legacy database Scaffolding an initial model and context Improving the model Updating properties and indexes Adding concurrency tokens and timestamps Creating complex relationships Working with non-Microsoft databases such as SQLite and PostgreSQL


Section 1: Introduction

Section 2: 1. Get Started with EF Core: On Your Legacy Database

Section 3: 2. Improve the Model

Section 4: 3. Model Complex Relationships

Section 5: 4. Work with Non-Microsoft Databases

Section 6: Conclusion