Linq to SQL Like
Operator:
var query = from c in Customers
where c.City.StartsWith("Lo")
select c;
where c.City.StartsWith("Lo")
select c;
var query = from c in Customers
where c.City.StartsWith("L") && c.City.Contains("n")
select c;
where c.City.StartsWith("L") && c.City.Contains("n")
select c;
var query = from c in ctx.Customers
where
SqlMethods.Like(c.City, "L_n%")
select c;
No comments:
Post a Comment