I need to create a temp table through ADO.NET, do BulkCopy and then Merge on the server between temp and the actual table.
The problem is creating a dynamic temp table using pure ADO.NET. The schema should be the same as the existing table, but this table is created using ORM (NHibernate or Entity Framework, we are not sure yet). It also means that the pattern may change in the future.
Is there a way to create a table in a database using simple ADO.NET objects? For example, a DataTable containing the schema of the source table?
All information pointing to me in the right direction is welcome.
source share