Table of Contents

Interface ITeamRepositoryCollection<TTeamEntity, TTeamMemberModel>

Namespace
Tharga.Team.MongoDB
Assembly
Tharga.Team.MongoDB.dll
public interface ITeamRepositoryCollection<TTeamEntity, TTeamMemberModel> : IDiskRepositoryCollection<TTeamEntity>, IDiskRepositoryCollection<TTeamEntity, ObjectId>, IRepositoryCollection<TTeamEntity, ObjectId>, IReadOnlyRepositoryCollection<TTeamEntity, ObjectId>, IRepositoryCollection, IReadOnlyRepositoryCollection where TTeamEntity : TeamEntityBase<TTeamMemberModel> where TTeamMemberModel : TeamMemberBase

Type Parameters

TTeamEntity
TTeamMemberModel
Inherited Members
IDiskRepositoryCollection<TTeamEntity, ObjectId>.GetCollection()
IReadOnlyRepositoryCollection<TTeamEntity, ObjectId>.GetDirtyAsync()
IReadOnlyRepositoryCollection<TTeamEntity, ObjectId>.GetFailedIndices()
IRepositoryCollection.DropCollectionAsync()

Methods

TransferOwnershipAsync(string, string, string, CancellationToken)

Promotes one member and demotes another in a single update, only while the demoted one is still the Owner. False when no team matched.

Task<bool> TransferOwnershipAsync(string teamKey, string currentOwnerKey, string newOwnerKey, CancellationToken cancellationToken = default)

Parameters

teamKey string
currentOwnerKey string
newOwnerKey string
cancellationToken CancellationToken

Returns

Task<bool>

Remarks

Two members of one array change together, which a positional update cannot express and Tharga.MongoDB does not pass array filters for, so this goes to the driver directly.