S
Sjaakie
Hi,
I'm, what it turns out to be, fooling around with 3-tier design.
At several websites people get really enthusiastic about using custom
dataobjects instead of datasets/-tables.
While trying to write such layers myself I got stuck on how to get
filtered or sorted data from the data-layer.
This is what I got:
Objects
* class Marble
- MarbleID
- Color
- Size
Data-layer
* SqlHelper - ExecuteNonQuery, ExecuteDataSet, ExecuteReader etc.
* Marbles - int Insert(Marble m), bool Update(Marble m),
Marble[] ListAll, Marble[] Select(int marbleID)
Business-layer
* Marble[] ListMarbles()
* bool UpdateMarble(int marbleID, string color, string size)
etc.
I would like to filter results by using the property-name as column to
filter on. Is this possible? If not... how should I request a filtered
result from the data-layer, without having to create a seperate member
for every possible filter? And is it possible to sort object-properties
in an object-array?
I hope you understand my question....
TIA
I'm, what it turns out to be, fooling around with 3-tier design.
At several websites people get really enthusiastic about using custom
dataobjects instead of datasets/-tables.
While trying to write such layers myself I got stuck on how to get
filtered or sorted data from the data-layer.
This is what I got:
Objects
* class Marble
- MarbleID
- Color
- Size
Data-layer
* SqlHelper - ExecuteNonQuery, ExecuteDataSet, ExecuteReader etc.
* Marbles - int Insert(Marble m), bool Update(Marble m),
Marble[] ListAll, Marble[] Select(int marbleID)
Business-layer
* Marble[] ListMarbles()
* bool UpdateMarble(int marbleID, string color, string size)
etc.
I would like to filter results by using the property-name as column to
filter on. Is this possible? If not... how should I request a filtered
result from the data-layer, without having to create a seperate member
for every possible filter? And is it possible to sort object-properties
in an object-array?
I hope you understand my question....
TIA