private void uxFileChange_Click(object sender, RoutedEventArgs e) { var window = new ObstacleWindow(); window.Obstacle = selectedObstacle; if (window.ShowDialog() == true) { App.ObstacleRepository.Update(window.Obstacle.ToRepositoryModel()); LoadObstacles(); } }
private void uxNew_Click(object sender, RoutedEventArgs e) { var window = new ObstacleWindow(); if (window.ShowDialog() == true) { var UiObstacleModel = window.Obstacle; var repositoryObstacleModel = UiObstacleModel.ToRepositoryModel(); App.ContactRepository.Add(repositoryObstacleModel); // OR //App.ContactRepository.Add(window.Contact.ToRepositoryModel()); } }