public JsonResult DeleteListings(decimal [] ids) { OracleRepository repo = new OracleRepository(); bool isSuccess = false; foreach (var id in ids) { isSuccess = repo.DeleteListing(id); if (!isSuccess) { return Json(false, JsonRequestBehavior.AllowGet); } } return Json(true, JsonRequestBehavior.AllowGet); }
public JsonResult DeleteListing(decimal id) { OracleRepository repo = new OracleRepository(); var result = repo.DeleteListing(id); return Json(result, JsonRequestBehavior.AllowGet); }