diff --git a/DigitalData.Core.Application/Interfaces/Repository/IReadQuery.cs b/DigitalData.Core.Application/Interfaces/Repository/IReadQuery.cs index e3ace52..30739a9 100644 --- a/DigitalData.Core.Application/Interfaces/Repository/IReadQuery.cs +++ b/DigitalData.Core.Application/Interfaces/Repository/IReadQuery.cs @@ -21,32 +21,37 @@ public interface IReadQuery /// /// Asynchronously retrieves the first entity or a default value if no entity is found. /// + /// A to observe while waiting for the task to complete. /// A task that represents the asynchronous operation. The task result contains the entity or a default value. - public Task FirstOrDefaultAsync(); + public Task FirstOrDefaultAsync(CancellationToken cancellation = default); /// /// Asynchronously retrieves a single entity or a default value if no entity is found. /// + /// A to observe while waiting for the task to complete. /// A task that represents the asynchronous operation. The task result contains the entity or a default value. - public Task SingleOrDefaultAsync(); + public Task SingleOrDefaultAsync(CancellationToken cancellation = default); /// /// Asynchronously retrieves a list of entities. /// + /// A to observe while waiting for the task to complete. /// A task that represents the asynchronous operation. The task result contains the list of entities. - public Task> ToListAsync(); + public Task> ToListAsync(CancellationToken cancellation = default); /// /// Asynchronously retrieves the first entity. Throws an exception if no entity is found. /// + /// A to observe while waiting for the task to complete. /// A task that represents the asynchronous operation. The task result contains the first entity. - public Task FirstAsync(); + public Task FirstAsync(CancellationToken cancellation = default); /// /// Asynchronously retrieves a single entity. Throws an exception if no entity is found. /// + /// A to observe while waiting for the task to complete. /// A task that represents the asynchronous operation. The task result contains the single entity. - public Task SingleAsync(); + public Task SingleAsync(CancellationToken cancellation = default); /// /// Synchronously retrieves the first entity or a default value if no entity is found.