private void RefreshList() { if (CommitsCollection != null && CommitsCollection.Any()) { CommitsCollection.Clear(); } using (var session = DbService.Instance.SessionFactory.OpenSession()) { var commits = session.QueryOver <Commit>().List <Commit>(); commits.ForEach(commit => CommitsCollection.Add(commit)); } }
private void ClearViewModel() { if (CommitsCollection != null && CommitsCollection.Any()) { CommitsCollection.Clear(); } if (ChangesCollection != null && ChangesCollection.Any()) { ChangesCollection.Clear(); } if (ChangePatchCollection != null && ChangePatchCollection.Any()) { ChangePatchCollection.Clear(); } CommitSelectedItem = new KeyValuePair <int, string>(); ChangeSelectedItem = new Changes(); }