public void Handle(Contact c) { if (!_existByIdQuery.Execute(c)) { throw new Exception("User with this id not found"); } _deleteCustomerCommand.Execute(c); }
public IActionResult Delete(int id) { var response = _deleteContactCommand.Execute(id); return(CreateResult(response)); }
public IActionResult DeleteContact([FromRoute] int id) => _deleteContactCommand.Execute(id);