public static UnitOfWorkResult ErrResult(string message = "")
        {
            var res = new UnitOfWorkResult
            {
                IsSuccess = false,
            };

            if (!string.IsNullOrEmpty(message))
            {
                res.AddMessage(message);
            }
            return(res);
        }
        /// <summary>
        /// 仅当无需执行持久化操作时可以调用
        /// </summary>
        /// <returns></returns>
        public static UnitOfWorkResult SuccessResult(string message = "")
        {
            var res = new UnitOfWorkResult
            {
                IsSuccess   = true,
                UnitOfWorks = IoC.Resolve <IContext>().Local.UnitOfWorks
            };

            if (!string.IsNullOrEmpty(message))
            {
                res.AddMessage(message);
            }
            return(res);
        }