Exemplo n.º 1
0
 public void Handle(Contact c)
 {
     if (!_existByIdQuery.Execute(c))
     {
         throw new Exception("User with this id not found");
     }
     _deleteCustomerCommand.Execute(c);
 }
Exemplo n.º 2
0
        public IActionResult Delete(int id)
        {
            var response = _deleteContactCommand.Execute(id);

            return(CreateResult(response));
        }
 public IActionResult DeleteContact([FromRoute] int id) =>
 _deleteContactCommand.Execute(id);