Simple but still cryptic to me: why do StringPropertyConfiguration (and all other PropertyConfiguration properties) have 2 overloads for IsConcurrencyToken() ?
First:
public StringPropertyConfiguration IsConcurrencyToken()
Configures a property that will be used as an optimistic concurrency token.
And the second:
public StringPropertyConfiguration IsConcurrencyToken(bool?)
Determines whether a property should be used as an optimistic concurrency.
Why are you using one over the other? As I can see, there is no difference between these two overloads (at least not when working with them) ...
Using the first, you should write something like:
modelBuilder.Entity<Author>() .Property(x => x.Name) .IsConcurrencyToken();
And using the second, you should write:
modelBuilder.Entity<Author>() .Property(x => x.Name) .IsConcurrencyToken(true/false/null);
Did I miss something?
source share