public void ShouldDeleteMission() { Response aResponse = new Response(); missionRepo.Insert(MISSION1); missionRepo.Insert(MISSION2); aResponse = missionRepo.Delete(1); Assert.IsTrue(aResponse.Success); }
public string Delete(int Id, string CurrentUsername) { Mission mission = FindById(Id, CurrentUsername); if (mission != null) { return(MissionRepository.Delete(Id) ? null : Messages.IssueInDatabase); } else { return(Messages.NotFound); } }
public IActionResult Delete(int id) { _missonRepository.Delete(_missonRepository.Find(id)); return(RedirectToAction("Index", "Mission")); }