Csla provides wonderful base classess for business objects, sorting, filtering, but I could not find an easy way to implement Find(), FindAll(),ForEach(), RemoveAll()... basically all the methods, what the generic List<T> class implements.
My solutions is to create a new base class for my business objects inherited from BusinessBaseList :
public
abstract class SolBusinessListBase<T, C> : BusinessListBase<T, C>In this class a define a "List" property:
public
List<C> ListNow in my business objects I can use all the List<C> methods , like
List<Client> list = Clients.List.FindAll(delegate(Client client) { return client.LastName.StartsWith("A"); }); I do not have a deep knowledge about type casting, so I wonder how much is the overhead on theIs this the right way to do this, or is there a better way ?
Any help would be appreciated.
Thanks
Hunor
Copyright (c) Marimer LLC