public ActionResult Delete(int id) { bool status = true; try { if (id > 0 && id != null) { AccountServiceClient service = new AccountServiceClient(); status = service.Delete(id); } } catch (Exception e) { ModelState.AddModelError("error", "something went wrong"); status = false; throw e; } return(Json(status, JsonRequestBehavior.AllowGet)); }
public async Task Delete(Account account) { await accountServiceClient.Delete(account.Id); }