Exemplo n.º 1
0
        public async Task <ActionResult> Delete(Guid id)
        {
            try
            {
                await _customerBusinessLayer.DeleteCustomerAsync(id);

                return(NoContent());
            }
            catch (ArgumentException ex)
            {
                _logger.LogInformation(ex, $"Cannot delete non-existent customer {id}");
                return(BadRequest());
            }
        }