'ServiceStack AutoQuery AutoFilter Like operand
I am trying to implement SQL Like operator using AutoFilter attribute. Tried the below code,
[AutoFilter(field:"Name", Template = "{Field} like {Value}", ValueFormat = "%{0}%")]
and the transformed SQL Expression looks like this (from SQL Profiler),
WHERE ("Table"."Name" = @0) AND ("Table"."Name" = @1)',N'@0 nvarchar(4000),@1 varchar(8000)',@0=NULL,@1='denver'
What am I doing wrong? I tried QueryTerm.And,QueryTerm.Or and QueryTerm.Default as well.
Solution 1:[1]
You should use [QueryDbField] for Customizable Adhoc Queries.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 |
