Linq to Entities Wild-card LIKE Extension Method
To build a wildcard-enabled Linq query for Entity Framework, you have several methods available to use from the System.String class that Entity Framework supports and transforms into SQL: Contains(string value) StartsWith(string value) EndsWith(string value) A simple query example might be: var q = (from c in db.Customers where c.CompanyName.Contains(name) select c) .ToList(); The above example… Read More »