Closed VitaliyMF closed 6 years ago
In netstandard2.0 classes DbDataAdapter, DbCommandBuilder are come back and NReco.Data has classes with the same names. Open questions:
Decided:
using NRecoDataAdapter = NReco.Data.DbDataAdapter;
IQueryDataTableResult
with ToDataTable
methods and implement it in DataReaderResult
/ DbDataAdapter.SelectQuery
classes [for net45 and netstandard2.0 builds]DbDataAdapter.Update
that will be an alias for System.Data.Common.DbDataAdapter.Update
- as it can be used directly and with better flexibility. Instead of that, lets add special "DataSetAdapter" example to illustrate how to use DbCommandBuilder to generate Select/Insert/Update/Delete commands for System.Data.Common.DbDataAdapter by DataSet.
DataSet/DataTable come back in netstandard2.0 ( https://github.com/dotnet/corefx/pull/12426, https://github.com/dotnet/corefx/issues/8622 ), lets add extra overloads to support this structure by [DbDataAdapter] (https://github.com/nreco/data/blob/master/src/NReco.Data/DbDataAdapter.cs) class:
DataSet SelectQuery.ToDataSet()
,void SelectQuery.ToDataSet(DataSet)
DataTable SelectQuery.ToDataTable()
int DbDataAdapter.Update(string tableName, DataSet ds)
As result, NReco.Data.DbDataAdapter will become generic alternative to provider-specific System.Data.Common.DbDataAdapter implementations (or replacement for it in netstandard1.5-only ADO.NET connectors).