示例#1
0
        public void AddWish(Wish newWish)
        {
            
            // Add to data context 
            WishesDB.Wishes.InsertOnSubmit(newWish);

            // Save changes to db
            WishesDB.SubmitChanges();

            // Add to observable collection
            Wishes.Add(newWish);
        }
示例#2
0
        public void AddWish()
        {
            var newWish = new Wish();
            SelectedWish = newWish;
            WishesDB.Wishes.InsertOnSubmit(newWish);
            WishesDB.SubmitChanges();
            Wishes.Add(newWish); 


        }