P
Prefers Golfing
We are using Enterprise Library 3.1 Data Access Aplication Block. We pass a
Common.DbCommand to it's ExecuteDataSet. The DbCommand has parameters
attached and calls a stored procedure.
Several of our methods in our Data Access Layer return Datasets which
contain several, up to 16, tables. We'd like to return the DataSet with the
tables named instead of having to name them after the ExecuteDataSet.
For example:
select id, name, active from employees active_employees where active = 1
select id, name, active from employees inactive_employees where active = 0
would make the following possible:
sting tableName = ds.Tables[0].TableName;
// tableName would equal "active_employees"
without setting the table name with ds.Tables[0].TableName =
"active_employees"
Is this possible?
Common.DbCommand to it's ExecuteDataSet. The DbCommand has parameters
attached and calls a stored procedure.
Several of our methods in our Data Access Layer return Datasets which
contain several, up to 16, tables. We'd like to return the DataSet with the
tables named instead of having to name them after the ExecuteDataSet.
For example:
select id, name, active from employees active_employees where active = 1
select id, name, active from employees inactive_employees where active = 0
would make the following possible:
sting tableName = ds.Tables[0].TableName;
// tableName would equal "active_employees"
without setting the table name with ds.Tables[0].TableName =
"active_employees"
Is this possible?