I was testing the implementation in the thread answer ...https://stackoverflow.com/a/7891426/1468492... but I get an error trying to parse an expression with a ...DateTime..., for instance: ...t => t.Name == "NAME" && t.OpeningDate == DateTime.Now.... ...
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...
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 ...
I'm trying to write some code to match strings based on a pattern:...pattern: "dog and (cat or goat)" ...test string: "doggoat" result: true...test string: "dogfrog" result: false...I'm trying to write a parser using Sprache, with most of the logic provid...
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
...
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...
I am trying to parse a LambdaExpression Tree using DynamicExpression.ParseLambda but I cannot get it to correctly parse when using string.Equals with the StringComparison enum....I have tried:...a) using StringComparison but I get the error 'Unknown ident...
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....
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...
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(...
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...
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...
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...