/// <summary>
        /// 获取对应的C#类型
        /// </summary>
        /// <param name="column"></param>
        /// <returns></returns>
        private string GetCSharpType(Column column)
        {
            switch (column.Type)
            {
                case "System.Boolean":
                    return "bool";

                case "System.Byte":
                    return "byte";

                case "System.DateTime":
                    return "DateTime";

                case "System.Decimal":
                    return "decimal";

                case "System.Int32":
                    return "int";

                case "System.String":
                    return "string";
            }
            return column.Type;
        }
 /// <summary>
 /// 获取所有的数据列
 /// </summary>
 /// <param name="tableName"></param>
 /// <returns></returns>
 public IList<Column> GetColumns(string tableName)
 {
     IList<Column> result = new List<Column>();
     IList<string> primaryKeys = this.GetPrimaryKeys(tableName);
     SQLiteConnection conn = new SQLiteConnection(ConfigurationManager.ConnectionStrings["SQLiteConnectionString"].ConnectionString);
     conn.Open();
     using (SQLiteCommand cmd = new SQLiteCommand(String.Format(CultureInfo.InvariantCulture, "SELECT * FROM [{0}].[{1}]", "main", tableName), conn))
     using (SQLiteDataReader rd = (SQLiteDataReader)cmd.ExecuteReader(CommandBehavior.SchemaOnly))
     using (DataTable columns = rd.GetSchemaTable())
     {
         foreach (DataRow schemaRow in columns.Rows)
         {
             Column column = new Column();
             column.Name = schemaRow[SchemaTableColumn.ColumnName].ToString();
             column.Type = this.GetDataType(schemaRow["DataTypeName"].ToString().ToLower(CultureInfo.InvariantCulture));
             column.Description = column.Name;
             column.Nullable = (bool)schemaRow[SchemaTableColumn.AllowDBNull];
             column.DefaultValue = schemaRow[SchemaTableOptionalColumn.DefaultValue].ToString();
             column.Sequence = long.Parse(schemaRow[SchemaTableColumn.ColumnOrdinal].ToString());
             column.Type = this.GetCSharpType(column);
             column.Primary = primaryKeys.Contains(column.Name);
             result.Add(column);
         }
         if (result.Count > 0)
         {
             result = new List<Column>(result.OrderBy<Column, string>(c => c.Name));
         }
         conn.Close();
         return result;
     }
 }