I try to use optimistic concurrency check in EF Core with SQLite.
The simplest positive scenario (even without concurrency itself) gives me
Microsoft.EntityFrameworkCore.
I have been using Ivan's answer with great success up to this point. When I updating to EntitiyFrameworkCore 3.1, though, I started getting this warning:
The property '{column name}' on entity type '{entity name}' is a collection or enumeration type with a value converter but with no value comparer. Set a value comparer to ensure the collection/enumeration elements are compared correctly.
To address this, I enhanced his solution by adding:
property.SetValueComparer(new ValueComparer(
(c1, c2) => c1.SequenceEqual(c2),
c => c.Aggregate(0, (a, v) => HashCode.Combine(a, v.GetHashCode())),
c => c.ToArray()));
(based off of a response to a GitHub issue)