开发者

Search by Letters using LINQ

开发者 https://www.devze.com 2022-12-29 22:54 出处:网络
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

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 Li开发者_JAVA百科nq


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

0

精彩评论

暂无评论...
验证码 换一张
取 消