private void GetFamilyFromService(CACCCheckInDb.Person person) { try { CACCCheckInDb.People people = null; if (person != null) { logger.Debug("Retrieving GetPeopleByFamilyId from CACCCheckInService"); using (CACCCheckInServiceProxy proxy = new CACCCheckInServiceProxy()) { proxy.Open(); if (person.FamilyId.HasValue) { people = new CACCCheckInDb.People( proxy.GetPeopleByFamilyId(person.FamilyId.Value)); people.CollectionChanged += new NotifyCollectionChangedEventHandler(FamilyCollectionChanged); people.ItemEndEdit += new CACCCheckInDb.ItemEndEditEventHandler(PeopleItemEndEdit); } } } Debug.Assert(View != null); View.ViewDispatcher.BeginInvoke(DispatcherPriority.DataBind, new DispatcherOperationCallback( delegate(object arg) { View.FamilyDataContext = people; return(null); }), null); } catch (Exception ex) { Debug.Assert(View != null); View.ViewDispatcher.BeginInvoke(DispatcherPriority.DataBind, new DispatcherOperationCallback( delegate(object arg) { View.DisplayExceptionDetail(ex); return(null); }), null); } }