All Questions
Tagged with linq-expressions dynamic-linq
15 questions
2
votes
2
answers
2k
views
SELECT result map to entity in Dynamic Linq in Entity Framework Core
I have a Linq query which is selecting 2 columns(that can be any 2 from all columns) dynamically based on some condition.I need to map the query result in to below model irrespective of selected ...
0
votes
1
answer
4k
views
Dynamic Linq in Entity Framework Core
I need to create a Linq query having Where and Select both dynamic.I am searching something like below code which will work in .net core.
var result = myQuery
.Where("Field1=\"SomeValue\&...
1
vote
1
answer
1k
views
How to create dynamic LINQ Expression with multiple binary expression conditions and a contains condition
I want to create a dynamic LINQ Expression for this kind of query
people.Where(x => x.Name="Some_Name" && x.Age>60 && x.ChildIds.Contains("Some_Id"));
What I ...
0
votes
1
answer
50
views
How to construct having clause in Dynamic LINQ
I want to find duplicate rows in a table given the list of columns. I am using Dynamic LINQ to group by columns and then want to check if there are any records having count greater than 1.
The group ...
0
votes
1
answer
542
views
How to escape string for dynamic linq where clause
I am using Dynamic LINQ to find the records using dynamic where clause. I have instance of Person class
public class Person
{
public string Name {get;set;}
public int Age {get;set;}
public ...
0
votes
1
answer
404
views
How can I add a specific dictionary entry to a Linq Expression?
I'm making use of the dynamic-linq-query-builder library and am attempting to generate an executable Linq query from a JSON representation of the query. I don't believe that this library supports ...
2
votes
1
answer
864
views
Text query parsing in Sprache
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 ...
0
votes
1
answer
432
views
Linq Dynamic query and include non related entity
I have a scenario where I have 3 Entities
class entityA
{
public Guid Id { get; set; }
public string NameA { get; set; }
}
class entityB
{
public Guid Id { get; set; }
public string ...
0
votes
0
answers
307
views
Linq query from a string
I'm trying to build a web application that allows to make any basic linq query (any query that shown here: https://msdn.microsoft.com/en-us/library/bb397927.aspx) on a list with data- iam getting a ...
0
votes
1
answer
118
views
Dynamic Linq Library can't handling one on many relationship in select clause
I would like to get records from the database using Dynamic Linq Library NuGet. How can I write query for select parent records along with list of child records. For example there is One-on-Many ...
1
vote
1
answer
526
views
Dynamic Linq Library can’t handling duplicate alias column names
I am trying to collect the data from database by using Dynamic Linq Library NeGet. When I loop through it showing this error ‘The item with identity 'FirstName' already exists in the metadata ...
0
votes
3
answers
792
views
How to get value from string expression
I have a string stored in my db:
"Users.ElementAt(1).LastName"
I then have an object like so:
MyClass myclass = new MyClass ()
{
Users = new List<User>()
...
0
votes
1
answer
875
views
Dynamic expression parsing in localized environment
So I'm trying to parse a simple arithmetic dynamic expression using System.Linq.Dynamic.
This runs fine when executed in an English environment where the CurrentCulture is English-US (and the decimal ...
16
votes
1
answer
15k
views
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 have the following form:
public class Filter
{
public string field { get; set; }
...
31
votes
4
answers
22k
views
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, if a user wants to search by city or search by state, I would have a dynamic LINQ ...