public ActionResult Delete(Guid id, Privacy p) { try { // TODO: Add delete logic here p.Delete(); return(RedirectToAction("Index")); } catch { return(View(p)); } }
public void Delete() { PrivacyList privacys = new PrivacyList(); privacys.Load(); Privacy privacy = privacys.FirstOrDefault(p => p.Description == "TestUpdate"); int rowsAffected = privacy.Delete(); Assert.IsTrue(rowsAffected == 1); }