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); }
public virtual async Task AddTagToEntityAsync(EntityTagCreateDto input) { var definition = await TagDefinitionStore.GetTagEntityTypeDefinitionAsync(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); }
public Task AddTagToEntityAsync(EntityTagCreateDto input) { return(EntityTagAdminAppService.AddTagToEntityAsync(input)); }