public JsonResult Delete(Guid kInsuranceId) { try { //Thread.Sleep(50); InsuranceManager.Delete(kInsuranceId); return(Json(new { Result = "OK" })); } catch (Exception ex) { return(Json(new { Result = "ERROR", Message = ex.Message })); } }
public IActionResult Delete(int id) { if (id == 0) { return(BadRequest("Invalid Id")); } try { var result = _insuranceManager.Delete(id); return(Ok(result)); } catch (Exception ex) { return(BadRequest(ex.Message)); } }