Hi there
I'm always coding referencing an object as a single class and if I want to get the collection of that class I just used the Get() and return as a list.
public abstract class Customer
{
private Int32 customerID;
private String customerName;
public abstract List<Customer> Get();
public abstract bool Add();
public abstract bool Update();
public abstract bool Delete();
}
Now ... I've been received comments from other about this that I should create another class for collection to cater this. I've also seen this especially in ORM (Object Relation Mapping) stuff but isn't that too much?
So it will be something like this:
public abstract class CustomerCollection
{
public abstract List<Customer> Get();
public abstract bool Add();
public abstract bool Update();
public abstract bool Delete();
}
What is your thought about this?
Thanks