public async Task <UrlDto> AddRoleAsync(UrlAddRoleDto addRoleDto) { AddRole.Command command = _mapper.Map <AddRole.Command>(addRoleDto); await _mediator.Send(command); return(await GetByIdAsync(addRoleDto.Id)); }
public async Task <ActionResult <UrlDto> > AddRole([FromRoute] UrlAddRoleDto addRoleDto) { return(await _urlService.AddRoleAsync(addRoleDto)); }