Top "Linq-expressions" questions

An API for composing code with declarative expression trees, used by LINQ and the DLR.

How do I dynamically create an Expression<Func<MyClass, bool>> predicate from Expression<Func<MyClass, string>>?

I trying to append where predicates and my goal is to create the same expression as: Services.Where(s => …

c# linq expression-trees linq-expressions
How to seed data with AddOrUpdate with a complex key in EF 4.3

I am trying to seed a development database with some test data. I have used context.People.AddOrUpdate(p => …

c# entity-framework-4.3 seed linq-expressions entity-framework-migrations
Dynamically add new lambda expressions to create a filter

I need to do some filtering on an ObjectSet to obtain the entities I need by doing this : query = this.…

c# linq linq-to-entities linq-expressions
Dynamic LINQ - Is There A .NET 4 Version?

I'm looking to use LINQ for some searching routines and wanted to have some dynamic where clauses. So, for example, …

c# linq dynamic-linq linq-expressions
Expression of type 'System.Int32' cannot be used for parameter of type 'System.Object' of method 'Boolean Equals(System.Object)'

i have one common grid view column filter method that filter grid view record with ColumnName and SearchText wise. here …

c# .net linq linq-expressions
LINQ with GROUP BY and HAVING COUNT

I'd like to understand what I am doing wrong with my GROUP BY query in Linq. I've tried many examples (…

c# linq sql-server-2008 group-by linq-expressions
How to convert a LambdaExpression to typed Expression<Func<T, T>>

I'm dynamically building linq queries for nHibernate. Due to dependencies, I wanted to cast/retrieve the typed expression at a …

c# .net casting lambda linq-expressions
Why are some object properties UnaryExpression and others MemberExpression?

Acting on the answer to my Select a model property using a lambda and not a string property name question, …

.net linq linq-expressions
Exception using OrElse and AndAlso expression methods

I am trying to build an expression tree programmatically. I have in my input, a list of condition classes which …

entity-framework linq linq-to-entities linq-expressions dynamic-linq
Dynamically get class attribute value from type

I'm trying to write a method that finds all types in an assembly with a specific custom attribute. I also …

c# reflection custom-attributes linq-expressions