Ejemplo n.º 1
0
 public ActionResult Delete(Guid id, Privacy p)
 {
     try
     {
         // TODO: Add delete logic here
         p.Delete();
         return(RedirectToAction("Index"));
     }
     catch { return(View(p)); }
 }
Ejemplo n.º 2
0
        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);
        }