score:0
string[] stringstosearchfor = new string[] { "text1", "text2" };
using (mydbcontext model = new mydbcontext())
{
var result = model.atable
.where(r => stringstosearchfor.any(s => r.name.contains(s)))
.tolist();
}
score:2
.where(x => stringstosearchfor.any(s => dbfunctions.like(x.name, "%" + s + "%")))
Source: stackoverflow.com
Related Query
- Searching for multiple strings using single database query with entity framework and LINQ
- Deleting multiple records with Entity Framework using a single LINQ query
- Searching for text in a database with Entity Framework
- LINQ query help: searching for data in a Many to Many using Entity Framework
- How to select a query with multiple columns and put it into variables using Entity Framework and ASP.NET?
- Is there a way to show a single employee with each of his projects using a query in Entity Framework
- Entity Framework EF Query using LINQ for related Entities - Getting Customers with their orders from specific period of time only
- Query Using Entity Framework Error with Database Table name Error
- Using a enum with flag in an Entity Framework query
- Common query for multiple similar entity types in Entity Framework
- Dynamic linq query expression tree for sql IN clause using Entity framework
- Retrieve single Entity Framework entities using a LINQ query or GetObjectKey?
- Entity Framework with Oracle using odp.net not taking parameters in linq query
- Entity Framework Core LINQ query with multiple where clauses
- Query Xml from SQL using Entity Framework Database First
- How to query many-to-many relationship with 'AND' condition using LINQ and Entity Framework
- Proper Searching with Linq, Entity Framework and Database Indexes
- How to get Multiple Result Set in Entity Framework using Linq with C#?
- Update Database using Entity Framework having primary key on multiple Columns
- Join multiple tables and single output using Entity Framework mvc5
- Does Entity Framework query the database multiple times if I use different fields of the same Linq query at different times?
- Pull data from multiple tables in one SQL query using LINQ and Entity Framework (Core)
- Exception raised when using a Linq query with Entity Framework
- How can I query using Entity Framework with an alpha-numeric comparison?
- Using Linq to query Entity Framework with Where clause and many-to-many relation
- Linq query with many to many relations using entity framework
- LIKE query with underscore (_) using Entity Framework & Sqlite
- Which LINQ statement is efficient for searching record using entity framework
- Searching Record List using single parameter Id and compare with multiple columns EF
- How to write Linq Queries for CRUD operations using Entity Framework with Asp.Net?
More Query from same tag
- SingleOrDefault() seems to be throwing a System.NullReferenceException
- How to get only the max string length column row from a table using linq?
- What is the benefit of SequenceEqual?
- The cast to value type 'Int32' failed
- How to deal with nested entities by using LINQ?
- Output an ordered collection (using LINQ) into a listbox
- LINQ Expression to combine / join
- Updating RadGridView after Editing Records in Real Time
- Find a Class object's Item with Maximum character count in a User Defined List
- Build Expression To sort based on the order of array
- How can I join two tables in Entity Framework
- LINQ: use anonymous type
- How to read a string with UTF8 coding using linq to entities
- Linq query returns half the results
- How can I order the output of my long LINQ query by a double and then a string?
- Linq, simple filter error...C#
- How to place an inline conditional union/self join in lambda expression?
- How to get a match on lookup list using Linq?
- Select in Method Syntax C# - returns a collection of anonymous object
- How to element-wise compare arrays in LINQ functions
- Formatting a GroupBy result for Report
- LInq left join with multiple condition in on clause
- Getting value of an attribute within namespace
- JArray Strings to JArray of Objects
- Linq2Sql point of retrieving data
- How to query multiple entities at once?
- Find related id from array in C#
- Get the last value of property in table using LINQ asp.net mvc
- Linq search - Display small part of searched text
- How to optimize this linq query?