private void AddWG_Click(object sender, RoutedEventArgs e) { using (var db = new ResourceModel()) { MessageBox.Show(db.AddWorking_Group(TB_Title.Text)); } Update(); }