Learn how to improve code against existing databases (including less than desirable legacy databases) using Entity Framework Core.
- [Rich] Hi, I'm Rich Goforth, I'm a software architect and consultant. Since 2006, I've been coding on the Microsoft stack, from databases, to the web, to mobile devices, often, we want to rewrite existing applications to make them more maintainable. Or create new functionality against existing data. Coding against existing databases provides a different set of challenges, than working with a new data set. Most demos and examples focus on new databases. So here we're going to spend some time specifically in the world of an existing database.
Have you ever had a table filled with ambiguous field names? Or every field prefixed with a type? There are a lot of things about older databases that we'd like to hide from new code. We want our new work to be legible, and easy to maintain. And dealing with the trappings of legacy databases, can really inhibit that goal. In this course, we'll be working with a database from a fictitious sports nutrition company called H plus sport. EntityFrameworkCore is going to allow us to write clean code, against this less than desirable database. As a bonus, it will function on a wide variety of platforms.
So let's get started.
- 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