Table of Contents

Interface ITenantBranchRepository

Namespace
KadicAuth.Application.TenantBranches.Abstractions
Assembly
KadicAuth.Application.dll
public interface ITenantBranchRepository

Methods

AddAsync(TenantBranch, CancellationToken)

Task AddAsync(TenantBranch branch, CancellationToken cancellationToken = default)

Parameters

branch TenantBranch
cancellationToken CancellationToken

Returns

Task

DeleteAsync(TenantBranch, CancellationToken)

Task DeleteAsync(TenantBranch branch, CancellationToken cancellationToken = default)

Parameters

branch TenantBranch
cancellationToken CancellationToken

Returns

Task

GetAllByTenantAsync(Guid, CancellationToken)

Task<IEnumerable<TenantBranch>> GetAllByTenantAsync(Guid tenantId, CancellationToken cancellationToken = default)

Parameters

tenantId Guid
cancellationToken CancellationToken

Returns

Task<IEnumerable<TenantBranch>>

GetByIdAsync(Guid, CancellationToken)

Task<TenantBranch?> GetByIdAsync(Guid id, CancellationToken cancellationToken = default)

Parameters

id Guid
cancellationToken CancellationToken

Returns

Task<TenantBranch>

GetByIdIgnoringFiltersAsync(Guid, CancellationToken)

Looks up a branch by id while bypassing the global TenantId query filter. Reserved for platform-admin flows that must touch branches outside the caller's home tenant (e.g. the tenant-360 wizard creating the initial admin user in a freshly-provisioned tenant).

Task<TenantBranch?> GetByIdIgnoringFiltersAsync(Guid id, CancellationToken cancellationToken = default)

Parameters

id Guid
cancellationToken CancellationToken

Returns

Task<TenantBranch>

GetBySlugAsync(Guid, string, CancellationToken)

Task<TenantBranch?> GetBySlugAsync(Guid tenantId, string slug, CancellationToken cancellationToken = default)

Parameters

tenantId Guid
slug string
cancellationToken CancellationToken

Returns

Task<TenantBranch>

GetDefaultBranchForTenantAsync(Guid, CancellationToken)

Task<TenantBranch?> GetDefaultBranchForTenantAsync(Guid tenantId, CancellationToken cancellationToken = default)

Parameters

tenantId Guid
cancellationToken CancellationToken

Returns

Task<TenantBranch>

GetExistingIdsAsync(IEnumerable<Guid>, CancellationToken)

Task<HashSet<Guid>> GetExistingIdsAsync(IEnumerable<Guid> ids, CancellationToken cancellationToken = default)

Parameters

ids IEnumerable<Guid>
cancellationToken CancellationToken

Returns

Task<HashSet<Guid>>

GetPagedByTenantAsync(Guid, int, int, bool?, CancellationToken)

Task<PagedList<TenantBranch>> GetPagedByTenantAsync(Guid tenantId, int pageNumber, int pageSize, bool? isActive = null, CancellationToken cancellationToken = default)

Parameters

tenantId Guid
pageNumber int
pageSize int
isActive bool?
cancellationToken CancellationToken

Returns

Task<PagedList<TenantBranch>>

SaveChangesAsync(CancellationToken)

Task SaveChangesAsync(CancellationToken cancellationToken = default)

Parameters

cancellationToken CancellationToken

Returns

Task

SlugExistsAsync(Guid, string, Guid?, CancellationToken)

Task<bool> SlugExistsAsync(Guid tenantId, string slug, Guid? excludeId = null, CancellationToken cancellationToken = default)

Parameters

tenantId Guid
slug string
excludeId Guid?
cancellationToken CancellationToken

Returns

Task<bool>

UpdateAsync(TenantBranch, CancellationToken)

Task UpdateAsync(TenantBranch branch, CancellationToken cancellationToken = default)

Parameters

branch TenantBranch
cancellationToken CancellationToken

Returns

Task