Exemplo n.º 1
0
        ///
        public override async Task Save()
        {
            IsBusy = true;

            try
            {
                foreach (var aspect in Aspects.Items.Cast <IResourceAspect>())
                {
                    await aspect.Save();
                }

                var updated = await ResourceServiceModel.SaveResource(EditableObject.Model);

                EditableObject.UpdateModel(updated);
            }
            catch
            {
                //TODO
                throw;
            }
            finally
            {
                IsBusy = false;
            }
        }
Exemplo n.º 2
0
        ///
        public override async Task Save()
        {
            IsBusy = true;

            try
            {
                foreach (var aspect in Aspects.Items.Cast <IProductAspect>())
                {
                    await aspect.Save();
                }

                var updated = await ProductServiceModel.SaveProduct(EditableObject.Model);

                EditableObject.UpdateModel(updated);
            }
            catch
            {
                throw;
            }
            finally
            {
                IsBusy = false;
            }
        }