Skip to main content
Filter by
Sorted by
Tagged with
2 votes
1 answer
112 views

I am trying to implement a LINQ Expression Visitor ([ExpressionVisitor][1]) for the following scenario: remove all pagination-related calls, such as Skip, Take, OrderBy, and OrderByDescending. What I ...
Ricardo Peres's user avatar
1 vote
1 answer
130 views

Trying to write an ExpressionVisitor that would rewrite a query Starting point var contractSubjectKey = new ContractSubjectKey(subjectId, rank); insurance = context.Set<Insurance>() ....
Matus's user avatar
  • 181
0 votes
1 answer
395 views

I've custom Query Class which will be used to build query with help of lambda expression like below var query = new Query("Person").Where<Person>(p => (p.Name == "Maulik" &...
Maulik's user avatar
  • 805
1 vote
0 answers
299 views

I have an expression that takes an expression as one of its parameters: I am using a ExpressionVisitor to get the values of constants see this SO post. but if a member is a memberAccess type I want ...
Jon's user avatar
  • 15.2k
3 votes
0 answers
707 views

I am trying to modify MemberBinding expression using Expression visitor. But I am getting an error when I try to compile the modified expression which says: 'variable 'source' of type 'EFTest.Views....
Zeeshan Zahoor's user avatar
1 vote
1 answer
801 views

I am trying to create an extension method that will be usable for both LINQ-to-Object and LINQ-to-Entities for creating a functioning Where query. More will go into it eventually but to start I am ...
StuffOfInterest's user avatar
1 vote
1 answer
257 views

I am creating a LINQ Provider. And the query could look like this: customers.Where( (f) => f.Date < DateTime.Now ) In my Query provider I Execute an ExpressionVisitor that reads the query and ...
joelmandell's user avatar
0 votes
1 answer
453 views

I am trying to create a dynamic formula via entity framework lambda from the columns of a model public class OutputModel { public decimal Result {get;set;} } public class TableTest { public ...
Vincent Dagpin's user avatar
1 vote
1 answer
1k views

I'm replacing a ParameterExpression with another with the following method: public static Expression ReplaceParameter( this Expression expression, ParameterExpression parameter, string name ) { ...
Mauro Sampietro's user avatar
39 votes
4 answers
19k views

I know from the MSDN's article about How to: Modify Expression Trees what an ExpressionVisitor is supposed to do. It should modify expressions. Their example is however pretty unrealistic so I was ...
t3chb0t's user avatar
  • 19.3k
14 votes
5 answers
5k views

I am trying to replace the parameter type in a lambda expression from one type to another. I have found other answers on stackoverflow i.e. this one but I have had no luck with them. Imagine for a ...
Jake Aitchison's user avatar
1 vote
2 answers
202 views

I'm trying to compare an object with a random value, which could be an ID, and ObjectKey or even with the same object. In short, I want to compare an object with anything, not just the same type. To ...
Cesar's user avatar
  • 645
2 votes
2 answers
999 views

I am following an example series on MSDN for creating a LINQ Provider and have hit a wall. I am expecting that when I write the following test that the ExpressionVisitor sub-class in the source-code ...
Johnathon Sullinger's user avatar
2 votes
2 answers
448 views

I've been trying to create a custom ExpressionVisitor that would generate an expression that (optionaly) throws a NullReferenceException on the first null value. The DebugView of the expression looks ...
t3chb0t's user avatar
  • 19.3k
0 votes
0 answers
112 views

I have a expression with two properties and, I need changing this expression at runtime to adding more items. public class ProductViewModel { public int Id { get; set; } ...
Renato Leite's user avatar
0 votes
1 answer
547 views

The Orderby statment is not supported by the Azure Table storage linq provider I have an Expression like .Where(t => (t.RowKey.CompareTo("U_") > 0)).OrderBy(user => user.UserName) i'm ...
Madu Alikor's user avatar
  • 2,682
1 vote
2 answers
471 views

I'm trying to create a dynamic AndAlso filter that will be used in a Where method to a LINQ-to-EF query: query.Where(filterExpression) where filterExpression is a compiled lambda So far I've ...
seebiscuit's user avatar
  • 5,093
4 votes
1 answer
2k views

I have the following Expression: .Call System.Linq.Queryable.Select( .Constant<System.Linq.EnumerableQuery`1[System.Linq.Dynamic.Tests.Helpers.User]>(System.Linq.Dynamic.Tests.Helpers.User[]...
Jochen Kühner's user avatar
2 votes
1 answer
323 views

Asume, that we expressions like this: someIQueryable.Where(x => x.SomeBoolProperty) someIQueryable.Where(x => !x.SomeBoolProperty) I need to convert (rewrite using expression visitor) ...
Gor Rustamyan's user avatar
0 votes
1 answer
1k views

I've got a problem with an implementation of the repository pattern for my WCF Data Service. To sum up, I'm trying to use a repository pattern within a client application that utilizes a plugable ...
The Senator's user avatar
  • 5,421
0 votes
1 answer
285 views

I am trying to convert a c# expression. Here is an example result I am looking for. Convert: Expression<Func<TestObj, bool>> filter = p => p.LastName == "Smith"; to this: Expression&...
apexdodge's user avatar
  • 7,057
3 votes
1 answer
378 views

I have written a LINQ-Provider which works perfectly but with one exception. It translates LINQ-Queries to ODATA-URL standards. If I have the following LINQ-Statement: .Select(x => x.Name.ToLower(...
Marco Klein's user avatar
2 votes
2 answers
1k views

We're having some issues implementing soft delete functionality with entity framework. The idea is to use a repository which is aware of the EF context. On the level of the repository we implemented a ...
JTI's user avatar
  • 19
2 votes
1 answer
1k views

I'm trying to replace a function call like (simplified) Utility.GetString(MyEntity.SomePropertyWithRelatedEntity)=="abc" with an expression visitor into something like p => p.SubRelatedEntities....
Andrej Macko's user avatar
3 votes
2 answers
746 views

Here what we want to do. We have data from the database that we need to format to make a report, including some calculation (Sum, Averages, and field to field calculation (ex : x.a / x.b)). One of ...
Groumy's user avatar
  • 243