21 lines
566 B
C#
21 lines
566 B
C#
using System.Threading;
|
|
using System.Threading.Tasks;
|
|
using xModels.Base;
|
|
|
|
namespace xDataService.Interfaces
|
|
{
|
|
/// <summary>
|
|
/// Typed Base Key Generator ...
|
|
/// </summary>
|
|
/// <typeparam name="TEntity"></typeparam>
|
|
/// <typeparam name="TKey"></typeparam>
|
|
public interface IXKeyGenerator<TEntity, TKey>
|
|
where TEntity : XBaseEntity<TKey>
|
|
{
|
|
bool IsEmpty(TKey id);
|
|
Task<TKey> GenerateKey(
|
|
IXBaseRepository<TEntity, TKey> repository,
|
|
CancellationToken cancellationToken = default
|
|
);
|
|
}
|
|
} |