The data annotation configuration is straightforward; we have already seen the annotation in the Introducing concurrency tokens section of this chapter and it is not something new to us. Let's see how the ConcurrencyCheck attribute is configured:
public class Post { // Code removed for brevity [ConcurrencyCheck] public string Url { get; set; } // Code removed for brevity }
The preceding configuration will let EF Core consider the Url column as the concurrency check column, and any further update to this column will restrict users from performing parallel updates.
We have already seen the concurrency conflicts while trying to edit posts in different tabs, which is kind of a simulation ...