Exemple #1
0
        public TableSchema GetTableSchema(string tableName)
        {
            TableSchema result = null;

            try
            {
                result = CacheManager.Instance.GetEntity <TableSchema, string>(
                    Constants.BeeDataTableSchemaCacheCategory + dbDriver.ConnectionName,
                    tableName, TimeSpan.FromHours(1), tableNamePara =>
                {
                    return(dbDriver.GetTableSchema(tableNamePara));
                });
            }
            catch (KeyNotFoundException)
            {
                ThrowExceptionUtil.ThrowMessageException("表中含有不支持的数据类型");
            }
            catch (Exception)
            {
                throw;
            }

            return(result);
        }