public class ExcludeAssetCustomFilter : StaticCustomFilter { public override IFilterClause GetFilterClause(IFilterClauseFactory filterClauseFactory) { var stringLiteral = ""; if (AssetID != null) { stringLiteral = string.Format("AssetID <> '{0}'", AssetID.GetValueOrDefault().ToString("B")); } return new StringLiteralFilterClause(stringLiteral); } public Guid? AssetID { get; set; } }