zzz projects Expression Tree Tutorial
Getting Started Documentation Knowledge Base
  • Getting Started
  • Documentation
  • Knowledge Base

Expression Tree Tutorial - Knowledge Base (KB)

8 results in tag: entity-framework-6

Intercept all EF6 Linq queries

I have a function which I want to run on every executed Linq query on a DbContext to modify the expression tree before execution. I've been having a look at the IDbCommandTreeInterceptor interface but that doesn't seem to provide an expression tree (whic...
entity-framework-6 expression-trees interceptor linq
asked by wizzardmr42

LINQ to Entities OrderBy Expression Tree

I am trying to write a LINQ query to orderBy a dynamic property given by a string value....Here is what my original code was:... Expression<Func<T, dynamic>> orderBy = i => i.GetType().GetProperty("PropertyName").GetValue(null); ...When I tried to run thi...
c# entity-framework-6 expression-trees linq linq-to-entities
asked by Seth Denburg

Modify the expression tree of IQueryable.Include() to add condition to the join

Basically, I would like to implement a repository that filters all the soft deleted records even through navigation properties. So I have a base entity, something like that:...public abstract class Entity { public int Id { get; set; } public bool...
.net c# entity-framework-6 expression-trees linq
asked by Peter Hurtony

Entity Framework + DayOfWeek

Using the ...System.Linq.Dynamic... (managed here ...https://github.com/kahanu/System.Linq.Dynamic... ), I am trying to capture the ...DayOfWeek... field found on the ...DateTime... for aggregation purposes using Entity Framework 6 (or greater)....Previou...
c# dynamic-linq entity-framework-6 expression-trees linq
asked by TravisWhidden

Linq: let statement as a constant?

I am working on a Linq query expression statement, and want to use a ...let... statement to set a constant value as part of the query to reduce potential errors. ...In my example... (this is total mock up). the let statement "validateCount" is the questio...
.net c# entity-framework-6 expression-trees linq
asked by TravisWhidden

LINQ to Entities only supports casting EDM primitive or enumeration types (unique new post)

Preface...I counted probably 20 questions pertaining to this particular error, but I did not find that any of them apply. I am doing something different in that I am creating my expressions programatically rather than by literal lambda syntax. I suspect...
entity-framework entity-framework-6 expression-trees
asked by oscilatingcretin

How to extract a where clause expression tree from IQueryable

I need to add an "Or" clause in a where clause dynamically, depending on some conditions to an existing IQueryable object. ...Using ExpressionBuilder, I can compose a left and right Expression> but for that to wrok, I need to extract the Expression> from ...
entity-framework-6 expression-trees lambda linq
asked by Stéphan

Accessing expression bodied members to build expression trees

Trying to build an order by expression using expression trees. But I am unable to access an expression bodied property of the query result's class. This is the class structure:...public class AssetFileRecord : IAuditable, IEntity, INavigateToCustomValues ...
c# entity-framework-6 expression-trees linq
asked by Abhay Nagaraj

Page 1 of 1
  • 1

Prime Library

Performance

  • Entity Framework Extensions
  • Entity Framework Classic
  • Bulk Operations
  • Dapper Plus

Expression Evaluator

  • C# Eval Expression
  • SQL Eval Function
More Projects...
Get monthly updates by subscribing to our newsletter!
SUBSCRIBE!