コード例 #1
0
        public async Task <IActionResult> DeleteCustomers(int id)
        {
            try
            {
                var result = await _CustomersRepo.DeleteCustomersAsync(id);

                if (!result)
                {
                    return(BadRequest(new ApiResponse {
                        Status = false
                    }));
                }
                return(Ok(new ApiResponse {
                    Status = true
                }));
            }
            catch (Exception ex)
            {
                _logger.LogError(ex.Message);
                return(BadRequest(new ApiResponse {
                    Status = false
                }));
            }
        }