This commit is contained in:
2026-05-08 04:30:04 +03:30
parent afe5c74d09
commit 34afd95640
20 changed files with 1022 additions and 713 deletions
+21 -9
View File
@@ -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
);
}
}