Skip to content

UUID Generation Still v4 Instead of v7 After Upgrading to .NET 9 / EF Core 9 #3460

@adnan-kamili

Description

@adnan-kamili

After upgrading to .NET 9 and EF Core 9, I noticed that the UUIDs generated for primary keys are still v4 instead of the expected version v7.

Here’s the entity class where the UUIDs are generated:

[Index(nameof(CreatedAt))]
public abstract class BaseEntity : IEntity
{
    [Key]
    [DatabaseGenerated(DatabaseGeneratedOption.Identity)]
    public string Id { get; set; }

    public DateTime CreatedAt { get; set; }

    public DateTime UpdatedAt { get; set; }
}

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions