← Back
Nick Chapsas January 28, 2025 46s

The New Id Type to Use in .NET | .NET Tips 13

Summary

.NET 9 introduces a new UUID (Universally Unique Identifier) type that improves upon the existing GUID structure by incorporating time-related data into the first few bytes. This new UUID V7 addresses database performance and fragmentation issues by creating sortable identifiers that eliminate the need to check for existing items or rely on third-party libraries. The enhancement allows developers to generate unique IDs more efficiently, particularly in database contexts where key generation and sorting are critical. The guid.CreateVersion7() method provides a built-in solution for generating these time-based, sortable unique identifiers.

View original episode ↗