Hello everybody,
I'm using LLBLGen Pro 2.5 (Sept. 27, 2007) with MS SQL-Server and Self Servicing.
And I have to say: I love LLBLGen :-)
But now I need a little bit help:
Nearly all of my Tables have a Column "Deleted by", which contains a Username if the record is "deleted" or with value NULL, when the record is not deleted.
Now I would like to create a "default-build-in" filter into all of my Collections, which will filter out deleted records. And of course I only want to write this code once and not for every single Collection-Class.
How can I change my Collection (or the Collection.template?) to do that?
I would like
- Check whether the field "Deleted by" is available
- if so, then set a default filter
- if there is still a filter, use it and expand it with my default filter
For Example:
I have a (single) "ProjectEntity" which contains a lot of "Attachments".
Via
projectEntity.Attachment
I get a Collection of Attachments. Of course I only want undeleted Attachment's.
Also when I directly use a "AttachmentCollection" with getMulti I want to get undeleted Attachments without setting an extra filter.
How can I do this directly in my Collection classes (or collection.template of LLBLGen)?
I hope you understand my poor english.....
Thank's a lot for your help,
Alexander