private new T[] Select(DbCommand cmd) { TableRowCollection rows = base.Select(cmd); T[] items = new T[rows.Count]; for (int i = 0; i < items.Length; i++) { items[i] = this.CreateElement(rows[i]); } return(items); }
public TableRowCollection Select(DbDataReader reader) { TableRowCollection rows = new TableRowCollection(this); while (reader.Read()) { object[] values = new object[reader.FieldCount]; reader.GetValues(values); rows.Add(values); } return(rows); }
private void provider_Updated(string table, long rowId, UpdateType type) { switch (type) { case UpdateType.Insert: case UpdateType.Delete: if (this.updated != null) { if (table == this.Name) { using (DbCommand cmd = this.SelectCommand("where rowid=" + rowId)) { TableRowCollection rows = base.Select(cmd); TableRow row = rows[0]; T el = this.CreateElement(row); this.updated(el, type); } } } break; } }