using Domains; namespace ApplicationLayer.InfrastructureServicesInterfaces; /// /// Generic repository pattern /// /// Entity type public interface IGenericRepository where T : class, IEntity { /// Get all entities from data storage /// Cancellation token Task> GetAllAsync(CancellationToken cancellationToken); /// Get one entity with specific id /// Identifier of entity /// Cancellation token Task GetByIdAsync(Guid id, CancellationToken cancellationToken); /// Add entity to storage /// Entity to add /// Cancellation token Task AddAsync(T entity, CancellationToken cancellationToken); /// /// Update entity in storage /// /// Entity to update /// Cancellation token Task UpdateAsync(T entity, CancellationToken cancellationToken); /// /// Remove entity from storage /// /// Entity to remove void Remove(T entity); }