.NET8* has this option:
self.Property(i => i.Id).HasDatabaseGeneratedOption(DatabaseGeneratedOption.Identity);