The ConcurrencyCheck Attribute

The ConcurrencyCheck attribute is used to specify that a property should be included in a WHERE clause in an UPDATE or DELETE statement as part of concurrency management.

public class Author
{
    public int AuthorId { get; set; }
    [ConcurrencyCheck]
    public string FirstName { get; set; }
    [ConcurrencyCheck]
    public string LastName { get; set; }
    public string Biography { get; set; }
    public ICollection<Book> Books { get; set; }
}

Fluent API

The Fluent API equivalent to the ConcurrencyCheck attribute is the IsConcurrencyToken method.


Created:
Last updated: 14/03/2017 16:33:43
Proficiency Level: Beginner