Exemplo n.º 1
0
        public async Task <PendingMembershipChangeDao> Add(PendingMembershipChangeDao membershipRenew, CancellationToken cancellationToken)
        {
            Guard.Argument(membershipRenew, nameof(membershipRenew)).NotNull();

            await DeleteByUser(membershipRenew.UserId, cancellationToken);

            var response = await Client.CreateDocumentAsync(_documentCollectionUri, membershipRenew, cancellationToken : cancellationToken);

            return(JsonConvert.DeserializeObject <PendingMembershipChangeDao>(response.Resource.ToString()));
        }
Exemplo n.º 2
0
        public async Task Update(PendingMembershipChangeDao pendingMembershipChange, CancellationToken cancellationToken)
        {
            Guard.Argument(pendingMembershipChange, nameof(pendingMembershipChange)).NotNull();

            await Client.UpsertDocumentAsync(_documentCollectionUri, pendingMembershipChange, cancellationToken : cancellationToken);
        }