All Questions
515
questions
0
votes
0
answers
39
views
Is possible to dynamically change table name in LINQ c#?
I am developing something like dashboard for our DataLoader tool(loads data batches to our MS CRM Dynamics application]. I am using .Net 8 and C# Blazor server up. I have created bdContext using ...
0
votes
1
answer
194
views
System.Linq.Dynamic.Core Date is empty & Date is not empty
How to do this Date is empty & Date is not empty in System.Linq.Dynamic.Core,
I am currently doing this that is not working:
if (filter.Operator.StartsWith("is empty") ||
filter....
0
votes
0
answers
78
views
is it possible to convert lambda function to string for use in system.linq.dynamic.core expression
I mean to convert something like:
query = query.Where(it => it.Color.Contains("blue")); // to @"Color contains "blue""
or
query = query.Where(it => it.Color....
0
votes
1
answer
237
views
System.Linq.Dynamic.Core: No applicable method 'ArrayLength' exists in type
When parsing the expression I get the error “No applicable method 'ArrayLength' exists in type 'Product'”.
Here's the expression itself:
var experession = "p => (p.MarketingProduct!= null) ...
0
votes
0
answers
108
views
Dynamic lync and JSON array
I'm writing a .NET Core app and I need to build a string to be used with Dynamic Linq.
The following condition is working if used with a normal linq condition but I have no idea how to translate it in ...
0
votes
1
answer
89
views
How to create a dynamic linq query chained with a or operator from a user input?
The library I used is : Microsoft.EntityFrameworkCore.DynamicLinq
I already managed to do it with an "and" operator, simply by chaining the "Where" in PrepareQuerySearch(Search ...
0
votes
0
answers
304
views
Dynamic property in Linq query
I have the following Linq expression:
var itemToUpdate = ItemsUpdated.FirstOrDefault(x => x.Id == itemId);
I need to adapt it so that x.Id is a dynamically defined property, for example:
var ...
1
vote
2
answers
5k
views
Entity Framework Core Dynamic Where Clause
I have been searching and I have not seen an example like this.
I want to query a Model table to retrieve all Models from German manufacturers.
My data structure is Model Table has a Navigation ...
3
votes
1
answer
942
views
C# how to query dynamic json?
If retrieve a JSON string for which the full schema is not known :
{
... other stuff
"data": [
{
"open": 110.05,
"high": 112.0,
...
0
votes
0
answers
144
views
Accessing dynamic table stored procedure using linq and show result in datagridview
I'm creating a dynamic procedure in which I pass the table name and two search fields names, when I call the stored procedure from the application using LINQ and pass the result to a datagridview, no ...
-1
votes
1
answer
39
views
In linq dynamic order by throw error invalid operation in C#
invalid operation
public static List<T> Sort<T>(SortingDto? request, List<T> entity)
{
if (request != null && request.SortKey != null)
{
var ...
0
votes
1
answer
300
views
How to use OrderBy extension method with a collection of dynamic objects?
I have a collection variable, whose elements are dynamic type, that is returned from a database using Dapper extension.
The returned collection is this (variable name is reporte):
[0]: {{DapperRow, ...
1
vote
1
answer
196
views
Dynamic linq not correctly apply on list of DynamicClass
I'm trying to use dynamic linq over DynamicClass list. From external source I'm getting field.Name = "firstName" and field.Value = "firstValue".
var dynamicIndexes = new List<...
0
votes
1
answer
5k
views
C# compiler error CS1963: "An expression tree may not contain a dynamic operation"
The following code:
var lst = new List<dynamic>();
lst.Add(new
{
Name = "Bob"
});
lst.AsQueryable().Where(x => x.Name == null);
Will produce compiler error CS1963. I ...
0
votes
2
answers
450
views
C# Automapper "Unsupported Mapping" with List<dynamic> result of LinQ query
Given the next working LinQ query:
var catalogues = (from cat in db.CATALOGUES
join doc in db.DOCUMENTS_CATALOGS on
new { a = cat.PFK_ENTERPRISE, b = cat....