score:1
you need to materialize the results using tolist()
or something similar in order to use your extension method.
var list = (a in db.modelaset
select a).tolist();
foreach(var item in list)
{
var query2 = b in list
where b.code.truncatedcode() == item.code.truncatedcode() // this doesn't work :(
select b;
}
Source: stackoverflow.com
Related Query
- Partial string matching in LINQ
- Linq to sql as object data source - designer problem with partial classes
- Partial string matching with LINQ/C#
- Is it right a LINQ query to check whether atleast one entity exists in string collection with a matching criteria (rownum<=1)
- Linq query to take the value from Array with matching sub string value
- Check if a string within a list contains a specific string with Linq
- Can you reverse order a string in one line with LINQ or a LAMBDA expression
- Can I use C# string interpolation with Linq to SQL
- Split string to List<string> with Linq
- convert string to DateTime in linq query with where clause?
- LINQ to SQL - Compile error when extending data context with partial class and methods
- C# Linq string compare with indexOf
- LINQ - Splitting up a string with maximum length, but not chopping words apart
- How to check if a string starts with a capital letter in a LINQ query
- How to find key value pair in a dictionary with values > 0 with key matching a certain string pattern?
- How linq function OrderByDescending and OrderBy for string length works internally? Is it faster than doing it with loop?
- LINQ Source Code Available
- Concatenate All Properties to a String with LINQ
- Split string with LINQ
- How do you sort a String List by the number of words matched with an Array in Linq
- Fragmented XML string parsing with Linq
- How to compare int with string in linq where clause
- Linq with where clause in many-to-many EF Code First object
- LINQ select next record with each matching result
- Split string and set default value if separator not found WITH LINQ
- Linq Query to Compare with List of string values
- Perform string search with Linq to Entities
- How to read a string with UTF8 coding using linq to entities
- LINQ Replace DBNull with Blank String
- LINQ orderby string with integer where 1,11,12,13 are not next to eachother?
More Query from same tag
- Querying Access database vb.net
- Convert IGrouping to IDictionary
- Distinct by order date and products SQL Server 2008
- Dynamically generated lookup key for IQueryable
- Filter List<Point> as per given Condition using LINQ
- Eleminate duplicates Items from a List<T> by foreach loop in C#
- Passing model data to view in MVC 5
- LINQ to XML row with two attributes
- Unexpected results in Linq query
- Normalize or Denormalize: Store Contact Details (Phone Numbers) in separate Table? Search Performance?
- sort and matching the list using linq
- Converting SQL Join Query to Linq query
- Use of Take() LINQ Method in Entity Framework Core v3.1.4
- Use LINQ to match property values to Dictionary keys
- insert object in selected linq array
- Linq Filter row differences in historical
- LINQ query to get the right data
- EntityFramework : Unable to include nested member in LINQ join query
- Asp .Net LINQ to SQL Databinding, do a "lookup" without a lookup table?
- LINQ: join multiple Table Column using Linq and find aggregated sum from child table values
- Dynamic Linq with Where and ObjectParameter produce wrong results
- I want to query a json file to find users with two or more tags in common
- How can apply a group by to a result of another group by using MongoDb?
- Extract expression from BlToolkit LINQ so it can be compiled
- C# Is it possible to abstract an orderby LINQ clause into a function parameter?
- How to get common object from a list of object based on a property?
- Return different objects with one LINQtoSQL statement
- How to convert linq result to DataTable
- Mock Entity Framework long LINQ query
- Sequence contains No elements when getting Null