#region ========================================================================= USING ===================================================================================== using Microsoft.EntityFrameworkCore.ChangeTracking; using Microsoft.EntityFrameworkCore.ValueGeneration; using System; #endregion namespace Lumina.DataAccess.Common.ValueGeneration; /// /// Generates time ordered version 7 GUIDs for identifier properties whose values are assigned by the persistence layer. /// public sealed class GuidV7ValueGenerator : ValueGenerator { /// /// Gets a value indicating whether the generated values are temporary. /// /// The generated identifiers are stored permanently, so they are not temporary values. public override bool GeneratesTemporaryValues => false; /// /// Generates the next time ordered identifier. /// /// The tracked entity entry that owns the property. /// A new version 7 GUID. public override Guid Next(EntityEntry entry) { return Guid.CreateVersion7(); } }