Ejemplo n.º 1
0
        static List <object> GetSchema(string connectionString, string providerName, string table)
        {
            SchemaReader  reader  = new SchemaReader(connectionString, providerName);
            DataTable     columns = reader.Columns(table);
            List <object> list    = new List <object>();

            foreach (DataColumn column in columns.Columns)
            {
                list.Add(new
                {
                    name = column.ColumnName,
                    type = GetSenchaType(column)
                });
            }
            return(list);
        }