score:2
Accepted answer
var concatenatedkeys = keys.select(m => m[0] + "~" + m[1]).tolist();
var filtered =
datacontext.t.where(s => concatenatedkeys.contains(
s.column0 ?? string.empty +
"~" +
s.column1));
score:0
var filtered =
datacontext.t.where(s => concatenatedkeys.contains(
s.anotherentity.column0 ?? string.empty +
"~" +
s.anotherentity.column1));
Source: stackoverflow.com
Related Query
- In Entity Framework 5 CodeFirst, how to create a query that will return when any pair of values are found?
- How to avoid Query Plan re-compilation when using IEnumerable.Contains in Entity Framework LINQ queries?
- How do I return an entity that is a query of multiple tables
- How to optimize Entity Framework query when using spatial types and automapper?
- Create a entity framework LINQ group join query to return a subset of properties from DTO and a list of another DTO, ASP.net core
- How to return values from a LINQ query and display them in a table using C#, ASP.NET MVC and Entity Framework
- How to create this query using Entity Framework and Linq
- How do I call a method from within a linq query that is retrieving from an Entity Framework model
- How can I generate this query with Entity Framework to return the corresponding collections?
- How to write a LINQ query that will return list of entities whose ID is included in specific list?
- How to make an Entity Framework query with a sum of the price that depends of the date?
- How can I create a method that will print LINQ query results?
- How to Filter DataGridView when bound to a linq query result that is linked to an EF4 Entity
- How to resolve Entity Framework Unable to create a constant value of type in a query involving navigation properties?
- How to create a Dynamic Query when there's a condition that won't use all fields in the where section with LinQ
- How to query 3 entities that have references between them with an Entity Framework query
- Entity Framework Query - how to return desired results
- How to avoid memory overflow when querying large datasets with Entity Framework and LINQ
- How to convert DateTime to TimeSpan in Entity Framework query
- How can i write SQL update query with where clause in Entity Framework in C#
- How to do a left outer join in Entity Framework without using the query syntax?
- Entity Framework Linq Query to List - Error when using contains: Only primitive types, enumeration types and entity types are supported
- How can I view the Entity Framework LINQ query plan cache?
- How do you query an object set and in that same query filter an attached entity collection?
- How to return IGrouping from Linq query when grouping
- Return parent and children in single entity framework query WITHOUT returning IQueryable or IEnumerable?
- How to query many-to-many relationship with 'AND' condition using LINQ and Entity Framework
- Entity Framework Core 3.1.1 Where query could not be translated. Either rewrite the query in a form that can be translated,
- How to solve LINQ to Entity query duplication when the queries only differ by a property?
- How to create a LINQ expression from an Entity Framework navigation property?
More Query from same tag
- Compare lists to retrieve object properties that don't match
- Linq idea on date calculation
- XML list serialization
- Generate LINQ dynamically
- Linq - search string in entity or sub-entity
- Why does LINQ generated SQL include multiple "IS NULL" conditions for the same column
- The cast to value type 'Int32' failed
- What is the best way to mix VB.NET's Option Strict and the new Option Infer directives?
- Order Eager Loaded Navigation Property Data In EF6 C#
- LINQ to Entities : "select new" expression tree throws System.NotSupportedException
- How do I know if my linq will return a useable object or a null
- Why is FxCop raising the error "Types that own disposable fields should be disposable" on a class with no disposable fields?
- C# Entity Framework: Subtracting entities
- F# Power Pack Linq Issue
- Outer Joining two Data Tables on multiple criteria
- Using Linq or Lambda to compare items in nested collections
- Convert IQueryable to List<T> type
- Get Non-Static MethodInfo for IEnumerable<T>.First() (Or make the static method work with EF)
- Change nested loop into Linq
- How to get the date difference by joining two tables?
- Get max DataGridViewRow based on Record ID using LINQ
- How to serialize partial classes with WebAPI and Linq
- Linq functions give strange compile error when ambiguous use of IEnumerable - possible workarounds?
- Slow LINQ missing from list query
- Linq or Lambda - Remove from List A all items from List B
- What's a clean way to break up a DataTable into chunks of a fixed size with Linq?
- Can not run basic LINQ query
- asp.net mvc returning joined data to view
- Manipulating variable type within LINQ expression
- Why Entity Framework Code First one to many Doesn't work properly