i have created a DAL using Generics like so
public List <myObject> GetItems(){
list<myObject> o = new list<MyObject>();
....do stuff here
return o.
}
this works great but i was wondering what i do if i only wanted to return one of these objects. my DAL will have methods like :
getAllitems
getItemById
since "getItemById" will only return one item, is it still recommended to create a list and add the single item to that list then return it? or is there perhaps a better way when returning only one object?
thanks in advance,
mcm
...
Go to the complete details ...