Wednesday, March 23, 2011

Help with T4 and Schema Information

Hello,

I am trying to create a data access layer using t4 and C#. I would like to be able to provide a DAL where I can access any database. The problem I am having is with some of the schema information. I am able to retrieve some information like column and table names but I would also like other information like the name of the primary key field, the primary key value. What's the most efficient way of doing this?

From stackoverflow
  • If you are targeting Microsoft SQL Server, Server Management Objects (SMO) is the best option. Here is an example.

    jumbojs : Hey thanks, what about db's like odbc and oledb?

0 comments:

Post a Comment