Адаптер таблицы не генерирует код автоматически на уровне доступа к данным
Я создал набор данных, и в набор данных я добавил адаптер таблицы. Но я не смог получить код адаптера таблицы, сгенерированный автоматически.класс адаптера таблицы показывает пустой код.когда я просматриваю код из набора данных.
namespace DataAcessLayer
{
partial class SalesAgentDS
{
partial class SELECTSALESAGENTDataTable
{
}
}
}
namespace DataAcessLayer.SalesAgentDSTableAdapters {
public partial class SELECTSALESAGENTTableAdapter {
}
}
он должен генерировать следующий код:
public partial class SalesAgentAdapter
{
private global::System.Data.OracleClient.OracleDataAdapter _adapter;
private global::System.Data.OracleClient.OracleConnection _connection;
private global::System.Data.OracleClient.OracleTransaction _transaction;
private global::System.Data.OracleClient.OracleCommand[] _commandCollection;
private bool _clearBeforeFill;
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
protected internal global::System.Data.OracleClient.OracleDataAdapter Adapter
{
get
{
if ((this._adapter == null))
{
this.InitAdapter();
}
return this._adapter;
}
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
public SalesAgentAdapter()
{
this.ClearBeforeFill = true;
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
public bool ClearBeforeFill
{
get
{
return this._clearBeforeFill;
}
set
{
this._clearBeforeFill = value;
}
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
internal global::System.Data.OracleClient.OracleTransaction Transaction
{
get
{
return this._transaction;
}
set
{
this._transaction = value;
for (int i = 0; (i < this.CommandCollection.Length); i = (i + 1))
{
this.CommandCollection[i].Transaction = this._transaction;
}
if (((this.Adapter != null)
&& (this.Adapter.DeleteCommand != null)))
{
this.Adapter.DeleteCommand.Transaction = this._transaction;
}
if (((this.Adapter != null)
&& (this.Adapter.InsertCommand != null)))
{
this.Adapter.InsertCommand.Transaction = this._transaction;
}
if (((this.Adapter != null)
&& (this.Adapter.UpdateCommand != null)))
{
this.Adapter.UpdateCommand.Transaction = this._transaction;
}
}
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
protected global::System.Data.OracleClient.OracleCommand[] CommandCollection
{
get
{
if ((this._commandCollection == null))
{
this.InitCommandCollection();
}
return this._commandCollection;
}
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
public global::System.Data.OracleClient.OracleConnection Connection
{
get
{
if ((this._connection == null))
{
this.InitConnection();
}
return this._connection;
}
set
{
this._connection = value;
if ((this.Adapter.InsertCommand != null))
{
this.Adapter.InsertCommand.Connection = value;
}
if ((this.Adapter.DeleteCommand != null))
{
this.Adapter.DeleteCommand.Connection = value;
}
if ((this.Adapter.UpdateCommand != null))
{
this.Adapter.UpdateCommand.Connection = value;
}
for (int i = 0; (i < this.CommandCollection.Length); i = (i + 1))
{
if ((this.CommandCollection[i] != null))
{
((global::System.Data.OracleClient.OracleCommand)(this.CommandCollection[i])).Connection = value;
}
}
}
}