last ...
This commit is contained in:
@@ -2,13 +2,25 @@ using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using xModels.Base;
|
||||
|
||||
namespace xDataService.Interfaces {
|
||||
public interface IXKeyGenerator<TEntity, TKey>
|
||||
where TEntity : XBaseEntity<TKey> {
|
||||
bool IsEmpty (TKey id);
|
||||
Task<TKey> GenerateKey (
|
||||
IXBaseRepository<TEntity, TKey> repository,
|
||||
CancellationToken cancellationToken = default
|
||||
);
|
||||
}
|
||||
namespace xDataService.Interfaces
|
||||
{
|
||||
/// <summary>
|
||||
/// Non Generic Key Generator Interface ...
|
||||
/// </summary>
|
||||
public interface IXKeyGenerator { }
|
||||
|
||||
/// <summary>
|
||||
/// Typed Base Key Generator ...
|
||||
/// </summary>
|
||||
/// <typeparam name="TEntity"></typeparam>
|
||||
/// <typeparam name="TKey"></typeparam>
|
||||
public interface IXKeyGenerator<TEntity, TKey> : IXKeyGenerator
|
||||
where TEntity : XBaseEntity<TKey>
|
||||
{
|
||||
bool IsEmpty(TKey id);
|
||||
Task<TKey> GenerateKey(
|
||||
IXBaseRepository<TEntity, TKey> repository,
|
||||
CancellationToken cancellationToken = default
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user