Passing Parameter to FieldLikePredicate

Posts   
 
    
shekar
User
Posts: 327
Joined: 26-Mar-2010
# Posted on: 10-Oct-2013 17:31:50   

LLBLGEN 4.0 Sql Sever 2008 C# Winforms LLBLGEN Framework .NET 4.0

I am trying pass description as parameter to FieldLikePredicate in below code.. How can I do this ?


 public static DataTable TitleView1(string description)
        {
            Filter.Clear();
            Dttitle.Clear();
            _sort = null;
            var titleview = new TitleViewTypedList();
            Filter.Add(new FieldCompareValuePredicate(TitleFields.Flag.SetObjectAlias("T"), ComparisonOperator.Equal,
                                                      PublicConstantClass.Validflag));
            Filter.AddWithAnd(new FieldLikePredicate(TitleFields.Description, "%description%"));
            _sort =
                new SortExpression(TitleFields.Description.SetObjectAlias("T") | SortOperator.Ascending);
            titleview.Fill(0, _sort, true, Filter);
            return titleview;
        }

Walaa avatar
Walaa
Support Team
Posts: 14995
Joined: 21-Aug-2005
# Posted on: 10-Oct-2013 20:31:19   

description = "%" + description + "%";

shekar
User
Posts: 327
Joined: 26-Mar-2010
# Posted on: 13-Oct-2013 11:52:16   

Walaa wrote:

description = "%" + description + "%";

Thank you