codesmith

CodeSmith Generator get View Schema


I am using the NetTiers CodeSmith templates.

I am looking for a way to get the underlying column and table information from a view. CodeSmith's schema explorer is rather lacking in information about views.

Is there something I am missing in CodeSmith. Or is there a way I can get the underlying schema of the view itself so I can parse it and build my own meta data?

If CodeSmith is unable to provide any of this information. Then I could execute some custom sql to get the information, however I am unsure how to do that in CodeSmith as well.


Solution

  • I work for CodeSmith... All the data that we get from the Informational_Schema is placed into the Extended Property bag. If you contact support I can send you the source to the SQLSchemaProvider and you can take a look at the exact queries we are running. If there is something that we are missing let us know.

    Please remember you can execute any .NET code inside of a template including ado.net :).