Using sortable UUID / GUIDs in Entity Framework
.NET 9 introduced Guid.CreateVersion7() / Guid.CreateVersion7(DateTimeOffset) methods to create sortable UUIDs / GUIDs based on the time of their creation. This can be particularly useful in databases where you want to maintain a chronological order of records (plus some perf benefits).
Currently, there is no native way to configure Entity Framework to use these methods when generating new GUIDs for primary keys. But we can do this on our own.







