public async Task <ActionResult> ActivateCustomerAsync([FromBody] int id) { try { _logger.LogDebug("Activating Customer"); var update = await _customerService.ActivateAsync(id); if (update) { _logger.LogDebug("Customer Activated"); return(Ok("Successully updated")); } else { _logger.LogDebug("Customer not found"); return(Conflict("Error! No Customer found")); } } catch (Exception ex) { _logger.LogError("An Exception occured: {ex}", ex.Message); _logger.LogError("Stack Trace: {ex}", ex.StackTrace); return(BadRequest(ex)); } }