public async Task <JsonResult> DeleteCustomer(string customerId, string caseId) { if (string.IsNullOrEmpty(customerId)) { Response.StatusCode = (int)HttpStatusCode.BadRequest; return(Json(new { Result = "Error" })); } try { bool result = await APIServices.DeleteCustomer(customerId, caseId).ConfigureAwait(false); return(Json(new { Result = "OK" })); } catch (Exception ex) { return(Json(new { Result = "ERROR", Message = ex.Message })); } }