when using SqlMethods.Like throwing exception

Posts   
 
    
Prashant
User
Posts: 2
Joined: 03-May-2014
# Posted on: 03-May-2014 23:30:45   
            var colContent = from content in metaData.Content
                             where SqlMethods.Like(content.TitleBrief, "Men%")
                             select content;

Error is

The binary expression '(Like(EntityField(LPLA_1.TitleBrief AS TitleBrief), "Men%") == True)' can't be converted to a predicate expression.

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39888
Joined: 17-Aug-2003
# Posted on: 04-May-2014 11:31:09   

What is SqlMethods?

You should use: where content.TitleBrief.StartsWith("Men")

Frans Bouma | Lead developer LLBLGen Pro