コード例 #1
0
        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
            }));
        }
コード例 #2
0
        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
                );
        }
コード例 #3
0
 public async Task <CampaignEntity> GetByIdAsync(string id) =>
 await _readRepository.GetByIdAsync(id);