Example #1
0
        public void RemoveFavourites(object o)
        {
            var model = new FavouriteModel();
            model.DeletedFavouriteEvent += e =>
            {
                //if (e.HasErrors)
                //{
                //    string joined = string.Join(",", e.ServerErrorMessages.ToArray());
                //    MessageBox.Show(joined);
                //}
            };

            model.DeleteFavourites(o);
        }
Example #2
0
        public void AddFavourite(object o)
        {
            var model = new FavouriteModel();
            model.SavedFavouriteEvent += e =>
            {
                if (EventAggregator != null)
                {
                    EventAggregator.GetEvent<PrismEvents.FavouriteAddedPrismEvent>().Publish(e);
                }
            };

            model.SaveFavourites(o);
        }