2

hi i m using Linq & C# and i want to filter my data as this syntax in Sql Syntax in sql is I hav one table name Customer in which name is field 'Select name from customer where name like 'C%'' can u help to solve this code in Linq

Nicholas Riley
  • 43,532
  • 6
  • 101
  • 124
Biswo
  • 351
  • 3
  • 11
  • 19
  • 1
    possible duplicate of [Wildcard search for LINQ](http://stackoverflow.com/questions/1040380/wildcard-search-for-linq) and [Like query ing LINQ to Object](http://stackoverflow.com/questions/2742667/like-query-ing-linq-to-object) – Christian C. Salvadó May 13 '10 at 06:26

1 Answers1

1

Also check

 StartsWith
   EndsWith

another alternate

 var query = from c in ctx.Customers
                where SqlMethods.Like(c.City, "L_n%")
                select c;

same question : Like query ing LINQ to Object

Community
  • 1
  • 1
Pranay Rana
  • 175,020
  • 35
  • 237
  • 263