Join Richard Goforth for an in-depth discussion in this video Adding concurrency tokens and timestamps, part of Accessing Existing Databases with Entity Framework Core.
- [Instructor] Usually applications against…the database allow more than one user at a time.…However if users modify a row at the same time…there's a problem.…Who's modification do we keep?…Usually we need to refresh the data…and have the second user try again…with the more recent data.…Concurrency tokens allow at any framework…to track specific columns for changes…or ensure that a field and a row has not been modified…since we last retrieved the data for it.…We're going to use the last update time stamp…on the order field as a concurrency token…for our application.…
We'll start in the model folders with our data context.…Scroll down to the order section…and find the last update property definition.…After has column type we'll add is concurrency token.…Since the last update is a time stamp field…and its value is generated on add or update…whenever any field in this row is updated…this field is updated.…This means that if the time stamp…is different than it was when we first got…the data we know that some field in the row…
- 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.