public void Test_Delete_in_trainerManager_after_Create() { _trainer2 = _trainerManager.Create(_trainer2); Assert.AreNotEqual(null, _trainer2); var isDeleted = _trainerManager.Delete(_trainer2); Assert.AreEqual(true, isDeleted); }
//Delete Trainer public ActionResult Delete(int id) { if (id > 0) { bool isDeleted = _trainerManager.Delete(id); if (isDeleted) { return(RedirectToAction("Index")); } } return(RedirectToAction("Index")); }