Toggle navigation
LINQPad
Categories
Discussions
Activity
Best Of...
Sign In
Home
Get columns names
Meidi
March 2017
I am trying to do a SqlBulkCopy from csv file to db. Since the columns are more than 50, I need to get columns names from DataContext's table. How to do this? Or is there a better way to do bulk copy?
0
·
Share on Facebook
Share on Twitter
Comments
Meidi
March 2017
I got it.
foreach( var p in new MyTableName().GetType().GetProperties())
p.Name.Dump();
0
·
Share on Facebook
Share on Twitter
Sign In
or
Register
to comment.
Comments
foreach( var p in new MyTableName().GetType().GetProperties())
p.Name.Dump();