public Fill ( |
||
dataTable | ||
Результат | int |
public int Fill(DataTable dataTable)
{
long logScopeId = DataCommonEventSource.Log.EnterScope("<comm.DbDataAdapter.Fill|API> {0}, dataTable", ObjectID);
try
{
// delegate to Fill8
DataTable[] dataTables = new DataTable[1] { dataTable };
IDbCommand selectCmd = _IDbDataAdapter.SelectCommand;
CommandBehavior cmdBehavior = FillCommandBehavior;
return Fill(dataTables, 0, 0, selectCmd, cmdBehavior);
}
finally
{
DataCommonEventSource.Log.ExitScope(logScopeId);
}
}
DbDataAdapter::Fill ( |
|
DbDataAdapter::Fill ( |
|
DbDataAdapter::Fill ( |
|
DbDataAdapter::Fill ( |
|
DbDataAdapter::Fill ( |
|
DbDataAdapter::Fill ( |
|
DbDataAdapter::Fill ( int startRecord, int maxRecords ) : int |
/// <summary> /// Retrieves a list of objects. /// </summary> /// <param name="transaction">The transaction to execute the command in.</param> /// <param name="result">When this method returns, a list of entity objects created /// by the SelectCommand. This parameter is passed uninitialized..</param> /// <returns></returns> public virtual void Get(Transaction transaction, out List <T> result) { result = new List <T>(); if (SelectCommand == null) { DataTable table = CreateDataTable(); InitializeDataAdapter(transaction); _dataAdapter.Fill(table); foreach (DataRow row in table.Rows) { result.Add(CreateEntityFromDataRow(row)); } } else { DataSet set; if (transaction == null) { set = _query.Execute(SelectCommand); } else { set = _query.Execute(transaction, SelectCommand); } foreach (DataRow row in set.Tables[0].Rows) { result.Add(CreateEntityFromDataRow(row)); } } }