score:0
Accepted answer
seems to work fine for me:
public class sometype
{
public string var1;
public string var2;
}
class program
{
static void main(string[] args)
{
var mylist = new list<sometype>();
mylist.add(new sometype() { var1 = "abc", var2 = "abc" });
mylist.add(new sometype() { var1 = "def", var2 = "def" });
foreach (var item in mylist.asqueryable().where("var1=\"abc\""))
console.writeline("item.var1 = " + item.var1);
}
}
Source: stackoverflow.com
Related Query
- LINQ Dynamic Query Library setup
- Using LINQ Dynamic Query Library with Dictionary<string, object> and .AsQueryable()
- How to build a nested query with the dynamic LINQ library
- How to dynamic add filters to a LINQ query against an Odata Source in C#
- EF4 CTP5 - LINQ Dynamic Query Library throws InvalidCastException
- Need help with a LINQ Query using the Dynamic LINQ Library
- LINQ query to perform a projection, skipping or wrapping exceptions where source throws on IEnumerable.GetNext()
- Query data using "Contains" keyword in Dynamic Linq in C#
- How can I build Linq query with dynamic OR statements?
- Dynamic query using LINQ to SQL
- LINQ TO SQL, Dynamic query with DATE type fields
- Dynamic linq query expression tree for sql IN clause using Entity framework
- The best way to build Dynamic LINQ query
- Is there any way to create a LINQ query as a variable without having the data source (yet)?
- Dynamic Linq query Contains List
- Dynamic LINQ query to get Field value from Database
- Dynamic linq query with multiple/unknown criteria
- linq query with dynamic predicates in where clause joined by OR
- How to write this Linq SQL as a Dynamic Query (using strings)?
- How to cast a Linq Dynamic Query result as a custom class?
- How can I create a dynamic LINQ query in C# with possible multiple group by clauses?
- LINQ Source Code Available
- Dynamic linq query not working
- Dynamic Linq query - how do I build the select clause?
- linq - how do you do a query for items in one query source that are not in another one?
- Linq to object dynamic query is it possible?
- How can I write the following code more elegantly using LINQ query syntax?
- Dynamic LINQ date query performance
- C# Linq query help removing foreach loops creating cleaner code
- Use a linq query as microsoft local report Data Source (WinForms)
More Query from same tag
- How to select 'product' rows instead of 'sale' rows
- How to remove particular value from data table in .net
- (Service) program freeze when getting an object from Service
- How to split a string in chunks of eight chars?
- Using classes instead of anonymous type in join C# WPF Linq
- Different Ways to Pull Number From Results View Of LINQ Query
- More efficient ways for foreach loop to add database Items to results List?
- Nested LINQ for Dictionary
- Compare a Custom Model index against int array in C# using Linq
- How to find the opposite of .Any()
- Conditional Output by Linq to XML
- LINQ - ConflictChangeException
- Linq to entity framework error when using datetimeoffset
- Select List of Object Which Contain Another List by LINQ
- Select nested list
- How to find string in Dictionary list and get its pair integer value
- Question of LINQ optimisation
- Finding symmetric difference with LINQ
- Get a list of tuples using Linq
- How to get XDocument element values
- LINQ get 10 objects based on integer in object row
- Include("myTable") in Linq to Entities in Silverlight
- Count child record and show zero if empty
- How to convert Group By SQL to LINQ?
- Linq to XML Get newer date element
- Grouping by month with LINQ
- Selecting according to a Min or Max on one value in LINQ
- DateTime Conversion in Entity Framework
- Linq outer join with conditions
- How to use Date function in LINQ to entities?