# XAF Tips and Tricks

**URL:** <https://discourse.softwarebydesign.com.au/t/xaf-tips-and-tricks/3701>\
**Category:** Code\
**Created:** [19 February 2022 22:47 UTC](https://discourse.softwarebydesign.com.au/t/xaf-tips-and-tricks/3701 "2022-02-19T22:47:45Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Kirsten\_Greed](https://discourse.softwarebydesign.com.au/letter_avatar_proxy/v4/letter/k/57b2e6/32.png) [@Kirsten\_Greed](https://discourse.softwarebydesign.com.au/u/Kirsten_Greed)\
**Post date:** [19 February 2022 22:47 UTC](https://discourse.softwarebydesign.com.au/t/xaf-tips-and-tricks/3701/1 "2022-02-19T22:47:45Z")

</div>

[Tip1]  
Beware putting an [Aggregate] tag on a collection unless you only ever want the collection accessed by a parent

[Tip2]  
Beware putting a filter controller on a business class if you also want to see the objects as a child collection.

Because the child collection will still get filtered in the following code for example.

```c#
public partial class FilterContactListViewController : ObjectViewController<ListView, ContactExt>
{
    public FilterContactListViewController()
    {

        
    }
    protected override void OnActivated()
    {
        base.OnActivated();
         

        View.CollectionSource.Criteria["Filter1"] = filter.GetCriteria(); // beware 

     
    }

}

```
