Exemple #1
0
        public async Task <DeletePersonResponseDto> DeleteAsync(DeletePersonRequestDto request)
        {
            if (request == null)
            {
                throw new ArgumentNullException("PersonService DeletePersonRequest  is invalid");
            }

            var resp = new DeletePersonResponseDto();

            try
            {
                await personDao.DeleteAsync(request.Id);
            }
            catch (Exception e) { resp.AddMessage(new Message(e.Message)); }

            return(resp);
        }
 public Task DeletePersonAsync(DeletePersonRequestDto deletePersonRequestDto)
 {
     return(DeleteAsync($"api/person/", new { id = deletePersonRequestDto.Id }));
 }