/// <summary>
        /// 查询
        /// </summary>
        /// <typeparam name="T"></typeparam>
        /// <param name="Entity"></param>
        /// <param name="Cache"></param>
        /// <returns></returns>
        public List <T> Get <T>(T Entity, bool Cache = false) where T : DTOBase, new()
        {
            var      sql  = CreateSql.Build((DTOBase)Entity);
            List <T> list = null;

            if (Cache)
            {
                list = Level2CacheRegister.Get <T>(sql, Entity.QueryParams, GetList <T>);
            }
            else
            {
                list = GetList <T>(sql, Entity.QueryParams);
            }

            Entity.ResetQuery();
            return(list);
        }
        /// <summary>
        /// 查询
        /// </summary>
        /// <typeparam name="T"></typeparam>
        /// <param name="where"></param>
        /// <param name="parameters"></param>
        /// <param name="columns"></param>
        /// <param name="Cache"></param>
        /// <returns></returns>
        public List <T> Get <T>(string where = null, object[] parameters = null, object[] columns = null, bool Cache = false) where T : DTOBase, new()
        {
            T Entity = new T();

            if (columns != null)
            {
                Entity.Select(columns);
            }

            if (!string.IsNullOrWhiteSpace(where))
            {
                Entity.Where(where, parameters);
            }

            var sql = CreateSql.Build((DTOBase)Entity);

            List <T> list = null;

            list = Cache ? Level2CacheRegister.Get <T>(sql, Entity.QueryParams, GetList <T>)
                         : GetList <T>(sql, Entity.QueryParams);
            Entity.ResetQuery();
            return(list);
        }