public async Task <ActionResult <string> > DeleteAsync(string identificacion) { var cliente = _clienteService.Eliminar(identificacion); var clienteViewModel = new ClienteViewModel(cliente); await _hubContext.Clients.All.SendAsync("ClienteEliminado", clienteViewModel); return(Ok(clienteViewModel)); }
// DELETE: api/Cliente/5 public GenericResponse <String> Delete(int id) { GenericResponse <String> response = new GenericResponse <String>(); try { servicio.Eliminar(id); response = ResponseUtil.CrearRespuestaOk(); } catch (CustomResponseException ex) { throw ex; } catch (Exception ex) { throw new CustomResponseException(ex.Message, 500); } return(response); }