Example #1
0
        public static bool Save <T>(T albianObject)
            where T : class, IAlbianObject
        {
            if (null == albianObject)
            {
                throw new ArgumentNullException("albianObject");
            }

            TaskBuilder builder           = new TaskBuilder();
            ITask       task              = builder.BuildSaveTask(albianObject);
            ITransactionClusterScope tran = new TransactionClusterScope();
            bool isSuccess = tran.Execute(task);

            if (!isSuccess)
            {
                return(isSuccess);
            }
            ResultCache.CachingObject(albianObject);
            return(isSuccess);
        }