Table of Contents

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

tag BuilderTag

The builder tag entity to create.

cancellationToken CancellationToken

Cancellation 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

cancellationToken CancellationToken

Cancellation 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

id Guid

The unique identifier of the builder tag to retrieve.

cancellationToken CancellationToken

Cancellation 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

name string

The name of the builder tag to retrieve.

cancellationToken CancellationToken

Cancellation token to cancel the operation.

Returns

Task<BuilderTag>

The builder tag entity if found; otherwise, null.