zzz projects Entity Framework Core EF Core
Home EF Core 5 Articles Knowledge Base Online Examples
  • Home
  • EF Core 5
  • Articles
  • Knowledge Base
  • Online Examples

Entity Framework Core - Knowledge Base (KB)

11 results for: in tag: expression-trees

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

Combine BinaryExpression and Expression<Func<dynamic, bool>> in C#

How can I combine ...BinaryExpression... and ...Expression<Func<dynamic / T, bool>>...?...For example:...void AddGlobalFilter<T>(Expression<Func<T, bool>> expr) { var parameter = Expression.Parameter(type, "t"); var member = Expression.Property(fi...
c# entity-framework-core entity-framework-core-2.1 expression-trees lambda
asked by Makla

C# LINQ - selecting a dynamic object based on properties defined at runtime

I've been trying to create an expression which can project a strongly typed EF Core entity into a dynamic object containing a list which are defined at runtime using a REST API call....This is what I have so far:...Expression<Func<Message, dynamic>> Dynam...
c# dynamic entity-framework-core expression-trees linq
asked by Stu Ratcliffe

Write Dynamic LINQ queries for sorting and projecting with EF Core

I am having troubles trying to get valid expressions for "inner graph" members....I wrote several code lines based on previous stack overflow answers. but I have issues finding a good "solution approach"....For example trying to express "a string" as a la...
c# entity-framework entity-framework-core expression-trees linq
asked by alhpe

Entity Framework Core- Use Expression Tree With Interface As Parameter

I will really appreciate some help with following scenario. I have the following classes:...public class Product : IHasPrice { public string Title { get; set; } public int Price { get; set; } public string CustomerId { get; set; } } public i...
c# entity-framework entity-framework-core expression-trees
asked by Tal Humy

EF Core SQL Function LIKE Method with Linq Expression not working for Non String types

am able to create an invoke Expression with SQL Functions like as shown below...var likeMethod = typeof(DbFunctionsExtensions).GetMethod("Like", new[] { typeof(DbFunctions), typeof(string), typeof(string) }); Expression.Call(null, likeMethod, Expression....
c# ef-core-2.1 entity-framework-core expression-trees
asked by Akshay Joy

Re-implementation of OrderBy, ThenBy and Null TypeMapping in Sql Tree error

I am trying to implement ...OrderBy... and ...ThenBy... in a different way to hide lambda expression from ...OrderBy... and ...ThenBy... extension methods. These extension methods accept classes which implement ...IOrderSpecification...: ...public class P...
c# entity-framework-core expression-trees lambda linq
asked by peyman gilmour

Complex edit of a body Expression<Func<T,bool>>

Summary:... I want to know how can I detect specific definitions from the expression's body then change it in the way I want, such as ...e.Entity.ListA.Union(e.ListB).Any(...)... ...To...e.Entity != null && ((e.Entity.ListA != null && e.Entity.ListA.Any(...
c# entity-framework entity-framework-core expression-trees linq
asked by AbuDawood

Correct Collection in ConstantExpression for EF Core

I try to realize my own Expression serializator/deserializator for passing it through services (I want to realize my own endpoint for EF Core service). So, now I have problem with Collections in LambdaExpressions. For example,...var dataQuery = testDb.Use...
.net-core c# entity-framework-core expression-trees linq
asked by Dmitriy

Conditionally ignore fields with LINQ select

I've been unable to find any examples where you can conditionally exclude fields based off a variable within a select projection in LINQ, see also ...LINQ: Select an object and change some properties without creating a new object.......Let me give some ba...
dynamic-linq entity-framework-core expression-trees linq linqkit
asked by Mark G

Entity Framework Core LINQ Tree Expression Problem with Concat

So I have a IQueryable extension that does a little more than this block of code. Essentially I'm combining of bunch of strings and afterwards doing a Contains on them. The problem I'm running into is that Entity Framework Core doesn't support System.Stri...
.net-core c# entity-framework-core expression-trees
asked by Richard Cawthon

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...

Related

  • EF Extensions Online Benchmark
  • WIN an EF Extensions license
  • EF6 BatchSaveChanges for only $79