Abstract base for new domain
This commit is contained in:
12
dotnet/AipsCore/Domain/Abstract/IAbstractRepository.cs
Normal file
12
dotnet/AipsCore/Domain/Abstract/IAbstractRepository.cs
Normal file
@@ -0,0 +1,12 @@
|
||||
using AipsCore.Domain.Common.ValueObjects;
|
||||
|
||||
namespace AipsCore.Domain.Abstract;
|
||||
|
||||
public interface IAbstractRepository<TEntity, in TId>
|
||||
where TEntity : DomainEntity<TId>
|
||||
where TId : DomainId
|
||||
{
|
||||
Task<TEntity?> GetByIdAsync(TId id, CancellationToken cancellationToken = default);
|
||||
Task SaveAsync(TEntity entity, CancellationToken cancellationToken = default);
|
||||
Task AddAsync(TEntity entity, CancellationToken cancellationToken = default);
|
||||
}
|
||||
Reference in New Issue
Block a user