示例#1
0
        public async Task <UrlDto> AddRoleAsync(UrlAddRoleDto addRoleDto)
        {
            AddRole.Command command = _mapper.Map <AddRole.Command>(addRoleDto);
            await _mediator.Send(command);

            return(await GetByIdAsync(addRoleDto.Id));
        }
示例#2
0
 public async Task <ActionResult <UrlDto> > AddRole([FromRoute] UrlAddRoleDto addRoleDto)
 {
     return(await _urlService.AddRoleAsync(addRoleDto));
 }