Example #1
0
        // TODO apply refreshInCache = false when refreshed assets are immediately discarded, like ApiDataLayer.CommitChanges(IAssetCache)
        private void CommitChanges(bool refreshInCache)
        {
            try {
                EntityContainer.Commit(this);

                if (refreshInCache)
                {
                    EntityContainer.Refresh(this);
                }
            } catch (APIException ex) {
                Logger.Error("Failed to commit changes.", ex);
            }
        }
        public override void CommitChanges()
        {
            try {
                EntityContainer.Commit(this);

                foreach (var child in Children)
                {
                    child.SetProperty("Parent", Asset.Oid);
                }

                EntityContainer.Refresh(this);
            } catch (APIException ex) {
                Logger.Error("Failed to commit changes.", ex);
            }
        }