private async Task <SharedWithEntity> ShareWithTenantAsync(string id)
        {
            var campaign = await _campaignRepository.GetByIdAsync(id);

            return(campaign.MapOrDefault(c => new SharedWithEntity
            {
                Kind = SharedWithKind.Tenant,
                OwnershipId = id,
                Picture = null,
                Email = null,
                Name = c.Name
            }));
        }
        public async Task UpdateAsync(string id, UpdateCampaignRequest request)
        {
            var entity = await _readRepository.GetByIdAsync(id);

            var updatedEntity = new CampaignEntity
            {
                Name = request.Name
            };

            await(await _container).ReplaceItemAsync(
                await _entityMutator.UpdateMetadataAsync(updatedEntity, entity, request.SharedWith),
                id
                );
        }
 public async Task <CampaignEntity> GetByIdAsync(string id) =>
 await _readRepository.GetByIdAsync(id);