LINQ COlumnAtrributes

  • Thread starter Thread starter wildThought
  • Start date Start date
W

wildThought

Does anyone know how to inspect the column attributes such as name and
DBType at run time assuming one is starting with a SQLMetal generated
table?
 
wildThought,

Well, if you have the type that has the ColumnAttribute attached to it,
you can easily cycle through the fields/properties using reflection, and
look for the ColumnAttribute attached to it. Once you have the instance,
you can get the information about the DBType from the properties on the
ColumnAttribute.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top