Johnyy
Johnyy

Reputation: 2116

How to name this data structure

I have this class in C#

1.A private DataTable. This datatable is initialized by a database query.

2.get(string filter) method, this method do DataTable.select(filter) on the private DataTable. And throw exception if it found 0 or more than 1 rows. Otherwise, it return the only row that it found.

I couldn't think of a proper name for it. Any comment is appreciated.

Upvotes: 0

Views: 87

Answers (3)

Andreas Eriksson
Andreas Eriksson

Reputation: 9027

getSingleRowByName

Replace "Name" with whatever the string parameter is representative of.

Upvotes: 1

Marnix
Marnix

Reputation: 6547

A UniqueRowSelector or SingleRowSelector? Because it can only return one row.

Upvotes: 1

harryovers
harryovers

Reputation: 3138

i think DatabaseTable describes it pretty well

Upvotes: 0

Related Questions