18 lines
501 B
C#
18 lines
501 B
C#
using System.Threading;
|
|
using System.Threading.Tasks;
|
|
using xDataService.Interfaces;
|
|
using xModels.Base;
|
|
|
|
namespace xDataService.Providers
|
|
{
|
|
public abstract class XKeyGenerator<TEntity, TKey> : IXKeyGenerator<TEntity, TKey>
|
|
where TEntity : XBaseEntity<TKey>
|
|
{
|
|
public abstract Task<TKey> GenerateKey(
|
|
IXBaseRepository<TEntity, TKey> repository,
|
|
CancellationToken cancellationToken = default
|
|
);
|
|
|
|
public abstract bool IsEmpty(TKey id);
|
|
}
|
|
} |