Interface IKeyGenerator
Key generator abstraction for generating unique IDs.
Replaces EF Core's automatic ID generation.
public interface IKeyGenerator
Methods
NextObjectIdAsync(CancellationToken)
Generate next unique ID for objects.
Task<long> NextObjectIdAsync(CancellationToken cancellationToken = default)
NextObjectIdBatchAsync(int, CancellationToken)
Generate batch of object IDs for bulk operations.
Task<long[]> NextObjectIdBatchAsync(int count, CancellationToken cancellationToken = default)
NextObjectIdBatchAsync(int)
Generate batch of object IDs for bulk operations.
Task<long[]> NextObjectIdBatchAsync(int count)
NextValueIdAsync(CancellationToken)
Generate next unique ID for values.
Task<long> NextValueIdAsync(CancellationToken cancellationToken = default)
NextValueIdBatchAsync(int, CancellationToken)
Generate batch of value IDs for bulk operations.
Task<long[]> NextValueIdBatchAsync(int count, CancellationToken cancellationToken = default)
NextValueIdBatchAsync(int)
Generate batch of value IDs for bulk operations.
Task<long[]> NextValueIdBatchAsync(int count)