M
Mikeon
Since i would be loading data for multiple students, is it not good
The reason you would like to have your own custom collection of
students is probably that you want to add some logic to it - such as
some kind of validation when adding new item.
I suppose that you do not need (or should not need) any kind of
validation in the DTO since the objects there should have no logic at
all. In this case I would return a simple array of students and not a
List<T> because the List allows you to add and remove objects which you
don't need in this scenario.
practice to define a collection of students within the DTO layer? I
have made a collection class within my business layer for my student
collections, it seems like duplicate code to define another collectin
of students with the dto layer? Or is it better to just use a generic
list for DTO types?
The reason you would like to have your own custom collection of
students is probably that you want to add some logic to it - such as
some kind of validation when adding new item.
I suppose that you do not need (or should not need) any kind of
validation in the DTO since the objects there should have no logic at
all. In this case I would return a simple array of students and not a
List<T> because the List allows you to add and remove objects which you
don't need in this scenario.