Webmaster Forums Banner Professional Hosting from Just Host
Welcome Guest Search | Active Topics | Members | Log In | Register

Astoria with sliver light savechanges doesn't work Options
manzor
Posted: Tuesday, August 12, 2008 10:22:30 AM
Rank: Advanced Member
Groups: Member

Joined: 1/31/2008
Posts: 32
Points: 96
Location: UK

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 ,
Sponsor
Posted: Tuesday, August 12, 2008 10:22:30 AM
Users browsing this topic
Guest


Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

Main Forum RSS : RSS

ASPNET Theme created by Boskone (Dan Ferguson)
Powered by HaqTech.Com
Copyright © 2003-2006 Yet Another Forum.net. All rights reserved.
This page was generated in 0.446 seconds.