hello ,
i have a problem while using astoria with sliverlight i mada EDM with ado entity framework tool then build my astoria data serive finally build my proxy uising datasvcutil.exe
i am using sliverlight 2 beta .
i facing a problem while saving changes
Code:
private void OnClickInsert(object sender, RoutedEventArgs e)
{
Customers c = new Customers
{
CustomerID = "miki",
CompanyName = "new company",
Country = "UK"
};
NorthWind.MergeOption = MergeOption.OverwriteChanges;
NorthWind.AddToCustomers(c);
NorthWind.BeginSaveChanges(OnSavingChanges, null);
}
private void OnClickDelete(object sender, RoutedEventArgs e)
{
if (CustomerGrid.SelectedItem != null)
{
Customers c = CustomerGrid.SelectedItem as Customers;
NorthWind.DeleteObject(c);
NorthWind.BeginSaveChanges(OnSavingChanges, null);
}
}
private void OnClickSaveUpdate(object sender, RoutedEventArgs e)
{
NorthWind.MergeOption = MergeOption.OverwriteChanges;
NorthWind.BeginSaveChanges(OnSavingChanges, null);
}
void OnRetriving(IAsyncResult iar)
{
try
{
DataServiceQuery<Customers> query = (DataServiceQuery<Customers>)iar.AsyncState;
IEnumerable<Customers> result = query.EndExecute(iar);
ObservableCollection<Customers> customers;
Dispatcher.BeginInvoke(() =>
{
customers = new ObservableCollection<Customers>();
foreach (Customers customer in result)
customers.Add(customer);
CustomerGrid.DataContext = customers;
});
}
catch { throw; }
}
there is no exception happened but the database doesn't changed
i try to using saveing with batch option i founded that my sliverlight application block and it is not responding
i need help please ,