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 foun开发者_如何学编程d.
I couldn't think of a proper name for it. Any comment is appreciated.
A UniqueRowSelector
or SingleRowSelector
? Because it can only return one row.
getSingleRowByName
Replace "Name" with whatever the string parameter is representative of.
i think DatabaseTable
describes it pretty well
精彩评论