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
branchTenantBranchcancellationTokenCancellationToken
Returns
- Task
DeleteAsync(TenantBranch, CancellationToken)
Task DeleteAsync(TenantBranch branch, CancellationToken cancellationToken = default)
Parameters
branchTenantBranchcancellationTokenCancellationToken
Returns
- Task
GetAllByTenantAsync(Guid, CancellationToken)
Task<IEnumerable<TenantBranch>> GetAllByTenantAsync(Guid tenantId, CancellationToken cancellationToken = default)
Parameters
tenantIdGuidcancellationTokenCancellationToken
Returns
- Task<IEnumerable<TenantBranch>>
GetByIdAsync(Guid, CancellationToken)
Task<TenantBranch?> GetByIdAsync(Guid id, CancellationToken cancellationToken = default)
Parameters
idGuidcancellationTokenCancellationToken
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
idGuidcancellationTokenCancellationToken
Returns
- Task<TenantBranch>
GetBySlugAsync(Guid, string, CancellationToken)
Task<TenantBranch?> GetBySlugAsync(Guid tenantId, string slug, CancellationToken cancellationToken = default)
Parameters
tenantIdGuidslugstringcancellationTokenCancellationToken
Returns
- Task<TenantBranch>
GetDefaultBranchForTenantAsync(Guid, CancellationToken)
Task<TenantBranch?> GetDefaultBranchForTenantAsync(Guid tenantId, CancellationToken cancellationToken = default)
Parameters
tenantIdGuidcancellationTokenCancellationToken
Returns
- Task<TenantBranch>
GetExistingIdsAsync(IEnumerable<Guid>, CancellationToken)
Task<HashSet<Guid>> GetExistingIdsAsync(IEnumerable<Guid> ids, CancellationToken cancellationToken = default)
Parameters
idsIEnumerable<Guid>cancellationTokenCancellationToken
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
tenantIdGuidpageNumberintpageSizeintisActivebool?cancellationTokenCancellationToken
Returns
- Task<PagedList<TenantBranch>>
SaveChangesAsync(CancellationToken)
Task SaveChangesAsync(CancellationToken cancellationToken = default)
Parameters
cancellationTokenCancellationToken
Returns
- Task
SlugExistsAsync(Guid, string, Guid?, CancellationToken)
Task<bool> SlugExistsAsync(Guid tenantId, string slug, Guid? excludeId = null, CancellationToken cancellationToken = default)
Parameters
tenantIdGuidslugstringexcludeIdGuid?cancellationTokenCancellationToken
Returns
- Task<bool>
UpdateAsync(TenantBranch, CancellationToken)
Task UpdateAsync(TenantBranch branch, CancellationToken cancellationToken = default)
Parameters
branchTenantBranchcancellationTokenCancellationToken
Returns
- Task