private void AddAnimal_Clicked(object sender, RoutedEventArgs e) { AnimalModel animalModel = new AnimalModel(); animalModel.Animal = textAnimal.Text; try { DbConnectionManager.AddAnimal(animalModel); } catch (Exception ex) { MessageBox.Show(ex.ToString()); } finally { textAnimal.Text = ""; ShowAllAnimals(); } }