Join Richard Goforth for an in-depth discussion in this video Why change the generated model, part of Accessing Existing Databases with Entity Framework Core.
- [Instructor] Now we have a functioning…Entity Framework model against our database.…We know how to keep it updated,…and we know how to use it to update the database.…Isn't that all we need?…It is, but we can do better.…We want to have code that is easy to read…and maintain in the long term.…To maximize the value of Entity Framework…there are changes that we can make…to improve the way that the application…interacts with the data.…We could improve the names of tables and properties…to semantically name the fields.…We can hide things that don't manage the application…with shadow properties and backing fields.…
We can isolate specific database logic…with things like concurrency tokens…and generated columns.…Often, additions to the model…can be made to improve the code,…but we don't want those additions in the database…just in the code.…As an example, let's open up the Models folder…and navigate to the Salesperson model.…In the main program we used the first name…and last name together.…Let's add a FullName property to the model…
- 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
Skill Level Intermediate
Getting Started with Entity Framework 6.1.3with Phil Japikse1h 34m Intermediate
SQL Server 2014 Essential Trainingwith Martin Guidry3h 51m Intermediate
SQL Server 2014 Backup and Recoverywith Martin Guidry1h 22m Intermediate
1. Get Started with EF Core: On Your Legacy Database
2. Improve the Model
3. Model Complex Relationships
4. Work with Non-Microsoft Databases
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.