score:1
Accepted answer
var results = from p in orders
from pre in prefixlist
where p.ordcust.startswith(pre))
select p;
score:1
var items = from o in orders
where (
from pf in xrfprefixes
where o.ordcust.startswith(pf.companyprefix)
select pf).any()
select o;
Source: stackoverflow.com
Related Query
- LINQ - I need to pull records from table 2 based on values in table 1
- Need LINQ expression to filter table based on foreign key values
- Select values from one table based on specific value of another table Linq
- LINQ query for grouping a table based on the values from another table
- Need to get all records from one table, that match values I return from another table
- Outer join in linq and get records based on a condition from second table
- linq query to join two tables and get the count from one table values from the other
- Joining two tables with LINQ while also returning null records from the second table
- how to take 100 records from linq query based on a condition
- Linq, selecting two records from one table based on 2 different ID's
- LINQ Query To Join Two Tables and Select Most Recent Records from Table B corresponding to Table A
- LINQ select from table where fieldValue is in another tables list of values
- LINQ query to return from one table based on matching another table
- asp.net mvc Linq exclude values from other table
- How to return values from a LINQ query and display them in a table using C#, ASP.NET MVC and Entity Framework
- LINQ to SQL join two tables to select parent table twice based on two different columns from child table
- LINQ retrieve values from a table that of which fields(of a certain column) are not equal of another table
- How to filter linq query based on all of the values of one property from another list
- Get List ordered by number of records from another table using Linq
- Linq group by multiple columns and getting extra values from table before group by clause
- Linq - Inner Join not retrieving all records from left table
- Linq query selects values from first row only in table
- Get data from a table after joining based on null value of joined table using LINQ
- Get records from table and related related table using Linq to entity
- Remove records from 1 query based on same values found in another query
- Using Linq to pull from IEnumerable<XElement> and store in data table
- LINQ - Get records from one table, with second table multi record matching
- How to get record form a different table based on a value from first table with linq expression?
- LINQ to SQL to find values starting with characters from another table
- Get columns values in data table using linq from Entity Framework
More Query from same tag
- Get database row from selected item in Combobox
- Inner join with two select clauses LinQ MVC
- Convert IGrouping from one class to another using linq
- Using Linq Select to create a new inherited object
- Create list with data from grouped Linq query plus related data from another table
- Operator >= cannot be applied to operands of type string and datetime
- How can I pass individual values from a string[] to the XDocument.Load Stream?
- How to return a serialized List or Ilist in linq?
- Linq solution to get greatest numbers of arrays
- Improving EF Query Performance - checking if rows exist in a prefetched List<string>
- LINQ query with FirstOrDefault vs ToArray
- LINQ query to entity framework isn't doing the Include() correctly
- LINQ get rows from a table that don't exist in another table when using group by?
- LINQ time subtraction in web api
- Array Initialization ways
- insert and represent intra-document one to many relationship in xml
- Group and sum and fetch with condition in Linq
- lambda expression to verify list is correctly ordered
- querying from cached data, simple linq statement
- C# Array.Contains () compilation error
- A LINQ query with grouping and filtering of special groups
- How to rollback the datacontext to the point of the last submitchanges
- sort string array using LINQ
- How to get the xml Element having optional value minOccurs=0
- Check dates fall within range using Linq
- SQL to L2S Translation Help
- LINQ - Select anonymous type which based on a collection property
- Why can't parse Json and Raw Result is show?
- LINQ GroupBy and Select on different property
- c# remove xml node including child ones if another match found