public void DeleteScenario(int id) { using (ScenarioRepository _scenarioRepo = new ScenarioRepository()) { _scenarioRepo.DeleteScenario(id); } }
/// <summary> Löscht das ausgewählte Szenario </summary> public void Delete() { /// <summary> Index des ausgewählten Szenarios </summary> int index = AllScenarios.IndexOf(AllScenarios.Where(p => p.IsSelected == true).FirstOrDefault()); Scenario scenario = AllScenarios.ElementAt(index); _scenarioRepository.DeleteScenario(scenario); BlueBlue = null; BlueRed = null; BlueGreen = null; BlueYellow = null; RedBlue = null; RedRed = null; RedGreen = null; RedYellow = null; GreenBlue = null; GreenRed = null; GreenGreen = null; GreenYellow = null; YellowBlue = null; YellowRed = null; YellowGreen = null; YellowYellow = null; IsListItemSelected = false; base.OnPropertyChanged("IsListItemSelected"); }