public virtual async Task AddTagToEntityAsync(EntityTagCreateDto input)
 {
     await RequestAsync(nameof(AddTagToEntityAsync), new ClientProxyRequestTypeValue
     {
         { typeof(EntityTagCreateDto), input }
     });
 }
        public async Task AddTagToEntityAsync(EntityTagCreateDto input)
        {
            var definition = await _tagDefinitionStore.GetTagEntityTypeDefinitionsAsync(input.EntityType);

            await CheckPolicyAsync(definition.CreatePolicy);

            var tag = await _tagManager.GetOrAddAsync(input.EntityType, input.TagName, CurrentTenant?.Id);

            await _entityTagManager.AddTagToEntityAsync(
                tag.Id,
                input.EntityType,
                input.EntityId,
                CurrentTenant?.Id);
        }
예제 #3
0
    public virtual async Task AddTagToEntityAsync(EntityTagCreateDto input)
    {
        var definition = await TagDefinitionStore.GetAsync(input.EntityType);

        await CheckAnyOfPoliciesAsync(definition.CreatePolicies);

        var tag = await TagManager.GetOrAddAsync(input.EntityType, input.TagName);

        await EntityTagManager.AddTagToEntityAsync(
            tag.Id,
            input.EntityType,
            input.EntityId,
            CurrentTenant?.Id);
    }
예제 #4
0
 public Task AddTagToEntityAsync(EntityTagCreateDto input)
 {
     return(EntityTagAdminAppService.AddTagToEntityAsync(input));
 }