Пример #1
0
        public async Task <IActionResult> DeleteAsync(int id)
        {
            var result = await _docService.DeleteAsync(id);

            if (!result.Success)
            {
                return(BadRequest(new ErrorResource(result.Message)));
            }

            var docResource = _mapper.Map <Doc, DocResource>(result.Resource);

            return(Ok(docResource));
        }
Пример #2
0
        public async Task <UnifyResponseDto> DeleteAsync(long id)
        {
            await _docService.DeleteAsync(id);

            return(UnifyResponseDto.Success());
        }