コード例 #1
0
        /// <summary>
        /// 类型转换
        /// </summary>
        /// <typeparam name="T"></typeparam>
        /// <param name="entity"></param>
        /// <returns></returns>
        public targetT Covert <targetT>()
            where targetT : EntityBase, new()
        {
            targetT t = new targetT();

            t.ReInitialize(this);
            return(t);
        }
コード例 #2
0
        /// <summary>
        /// 转换实体的同时不转换Schema
        /// </summary>
        /// <typeparam name="targetT"></typeparam>
        /// <returns></returns>
        public targetT CovertWithoutSchema <targetT>()
            where targetT : EntityBase, new()
        {
            targetT t = new targetT();

            t._tableSchema = this._tableSchema;
            t.Initialize(this);
            return(t);
        }