ADO.Net : Get table definition from SQL server tables

后端 未结 5 477
梦毁少年i
梦毁少年i 2021-01-12 20:37

I am using C# to write a method that returns the following information about a table: column names, column types, column sizes, foreign keys.

Can someone point me in

5条回答
  •  一整个雨季
    2021-01-12 20:57

    If you are using MS SQL Server then You should definately have a look at SMO namespace (server management objects).

    There are objects which You can use in .net responsible for all kinds of things in a database (including but not limited to tables, columns, constraints etc.)

提交回复
热议问题