// GET: SellersAccount/Edit/5 public ActionResult Delete(int id, Property model) { if (model.PropertyID != 0) { try { APIMethods.APIDelete <Property>(model.PropertyID.ToString(), "Properties"); return(RedirectToAction("Index")); } catch (Exception E) { throw new Exception(E.ToString()); } } else { return(View(APIMethods.APIGet <Property>(id.ToString(), "Properties"))); } }