Exemplo n.º 1
0
        public async Task <IActionResult> DeleteCustomer([FromRoute] Guid id)
        {
            if (!ModelState.IsValid)
            {
                return(BadRequest(ModelState));
            }

            return(await _customerApplicationService.Delete(id));
        }
 public ActionResult Delete(int id)
 {
     try
     {
         _customerApplicationService.Delete(id);
         return(Ok());
     }
     catch (Exception ex)
     {
         return(BadRequest(new { ex.Message }));
     }
 }
Exemplo n.º 3
0
        public ActionResult Delete(int id)
        {
            applicationServiceCustomer.Delete(id);

            return(Ok("Customer Deleted successfully!"));
        }