private ObservableCollection<MyEntity> _MyEntityList;
public ObservableCollection<MyEntity> MyEntityList
{
get{ return _MyEntityList; }
set
{
_MyEntityList = value;
RaisePropertyChanged("MyEntityList");
}
}
public void LoadData()
{
_Context.Load(_Context.GetMyEntityQuery(), LoadBehavior.RefreshCurrent,
DataLoaded, null);
IsBusy = false;
}
public void DataLoaded(LoadOperation<MyEntity> loadOperation)
{
if (loadOperation.HasError)
{
System.Windows.MessageBox.Show(loadOperation.Error.ToString(), "Load Error", System.Windows.MessageBoxButton.OK);
loadOperation.MarkErrorAsHandled();
MyEntityList = null;
}
else
MyEntityList = new ObservableCollection<MyEntity>(loadOperation.Entities);
IsBusy = false;
}
This blog is titled the way it is, because this is the method by which I came to learn most of the following information. 🤪
Thursday, June 24, 2010
Syntax for programmatically retrieving a recordset from RIAServices
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment