Hi Mathias,
If you add an extra property (it can be protected, and it doesn't actually need to do anything - although it's nicer if it's genuine) to your class:
Code:
protected virtual string BrandItemName
{
get { return _brandItemName; }
set { _brandItemName = value; }
}
Then add to your mapping of the class:
Code:
<property name="BrandItemName" formula="BrandName + ItemName" />
Alternatively, when you are saving your item objects, persist a genuine BrandItemName protected property so that you can search on it later. (I would tend towards this option personally)
Then you can use the criteria:
Code:
.Add(Expression.Like("BrandItemName", "%search%"))
Does that help solve your problem?
Regards,
Richard