Use Guid.CreateVersion7()

Proprietary

Replace Guid.NewGuid() with Guid.CreateVersion7(). Version 7 GUIDs are time-ordered and better for database primary keys, indexing, and sorting. Available since .NET 9.

OpenRewrite.Recipes.CSharp.Migration.Dotnet.Net9.UseGuidCreateVersion7
mod run . --recipe=OpenRewrite.Recipes.CSharp.Migration.Dotnet.Net9.UseGuidCreateVersion7

Install it once, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.