示例#1
0
        public async Task <ActionResult <DeveloperViewModel> > Remove(Guid id)
        {
            var developer = _mapper.Map <DeveloperViewModel>(await _developerRepository.GetByIdToRemove(id));

            if (developer == null)
            {
                return(NotFound());
            }

            try
            {
                await _developerService.Remove(id);
            }
            catch (Exception ex)
            {
                NotifyError(ex.Message);
                return(CustomResponse());
            }

            return(CustomResponse(developer));
        }