public async Task <IActionResult> DeleteCustomer(string customerId) { var customerEntity = await _dbContext.Customers.Where(c => c.CustomerID == customerId).FirstOrDefaultAsync <CustomerEntity>(); if (customerEntity == null) { return(NotFound()); } _dbContext.Remove(customerEntity); await _dbContext.SaveChangesAsync(); return(Ok()); }