Interface IBuilderTagRepository
- Namespace
- Builvero.Application.Interfaces.Repositories
- Assembly
- Builvero.Application.dll
Defines the contract for builder tag data access operations including retrieval and creation.
public interface IBuilderTagRepository
Remarks
This repository interface provides methods for managing builder tag entities. Builder tags are used to categorize and label projects, helping users discover projects that match their interests.
Methods
CreateAsync(BuilderTag, CancellationToken)
Creates a new builder tag entity in the database.
Task<BuilderTag> CreateAsync(BuilderTag tag, CancellationToken cancellationToken = default)
Parameters
tagBuilderTagThe builder tag entity to create.
cancellationTokenCancellationTokenCancellation token to cancel the operation.
Returns
- Task<BuilderTag>
The created builder tag entity with generated ID and timestamps.
GetAllAsync(CancellationToken)
Retrieves all builder tags from the database.
Task<List<BuilderTag>> GetAllAsync(CancellationToken cancellationToken = default)
Parameters
cancellationTokenCancellationTokenCancellation token to cancel the operation.
Returns
- Task<List<BuilderTag>>
A list of all builder tags.
GetByIdAsync(Guid, CancellationToken)
Retrieves a builder tag by its unique identifier.
Task<BuilderTag?> GetByIdAsync(Guid id, CancellationToken cancellationToken = default)
Parameters
idGuidThe unique identifier of the builder tag to retrieve.
cancellationTokenCancellationTokenCancellation token to cancel the operation.
Returns
- Task<BuilderTag>
The builder tag entity if found; otherwise, null.
GetByNameAsync(string, CancellationToken)
Retrieves a builder tag by its name (case-insensitive).
Task<BuilderTag?> GetByNameAsync(string name, CancellationToken cancellationToken = default)
Parameters
namestringThe name of the builder tag to retrieve.
cancellationTokenCancellationTokenCancellation token to cancel the operation.
Returns
- Task<BuilderTag>
The builder tag entity if found; otherwise, null.