You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In some cases it is useful to have fast access to in-memory rows represented by RecordSet structure (for example, for getting rows by ID values - like Legacy DataRowCollection.Find method).
I think RecordSet should remain as simple as possible (it should not become a monster like DataTable) and it internally should not handle any indexed access. Instead of that, separate class (RecordSetIndex) may incapsulate this functionality; it may accept list of columns for indexed access (may be used not only for primary key):
RecordSet rs;
var rsIdIndex = new RecordSetIndex(rs, "id");
var someRow = rsInIndex[5].FirstOrDefault();
RecordSetIndex should have .Refresh() method to rebuild index in case if RecordSet is changed.
The text was updated successfully, but these errors were encountered:
In some cases it is useful to have fast access to in-memory rows represented by RecordSet structure (for example, for getting rows by ID values - like Legacy DataRowCollection.Find method).
I think RecordSet should remain as simple as possible (it should not become a monster like DataTable) and it internally should not handle any indexed access. Instead of that, separate class (RecordSetIndex) may incapsulate this functionality; it may accept list of columns for indexed access (may be used not only for primary key):
RecordSetIndex should have .Refresh() method to rebuild index in case if RecordSet is changed.
The text was updated successfully, but these errors were encountered: