Skip to main content
The 2024 Developer Survey results are live! See the results

All Questions

Tagged with
-3 votes
1 answer
43 views

How can I access the properties that are more than one custom type deep? [closed]

C# Beginner here. I have this: public class Item { public int id { get; set; } public string name { get; set; } public virtual ICollection<Property> Properties { get; set; } { public ...
scytaleqc's user avatar
0 votes
0 answers
23 views

Can you use AJAX in an AWS Lambda/Serverless web page

In the past I've been able to be very creative using AJAX in ASP.Net websites, particularly for Intranet Applications. I've been exploring AWS Lambda/Serverless websites which have a great cost ...
Miguelito's user avatar
  • 322
0 votes
2 answers
44 views

filter a list inside a class in .net

I have this class models : public record AllTransactionsResponse { public List<TransactionItem> Item { get; init; } } public record TransactionItem { public ...
Ehsan Akbar's user avatar
  • 7,183
0 votes
0 answers
184 views

.NET 6 PredicateBuilder and Object.GetProperty() not working as expected with Dynamic Property names

I am currently working in WinUI 3 .NET 6 application and needed to implemented a PredicateBuilder as I need to provide dynamic Lambda Conditions based on dynamic property names. private ...
Sulay Joshi's user avatar
0 votes
1 answer
74 views

Is there a performance penalty when using a Select() inside a lambda Where() clause?

Stumbled upon something while trying to evaluate which events I need to create. I had a code like this: var eventsToBeCreated = requiredEventDates.Where(d => !events.Select(e => e....
Patric's user avatar
  • 2,951
0 votes
1 answer
31 views

Fill the List of Expressions with the class properties based on list of string

There is a class Employee, defined below: class Employee { public int Id { get; set; } public string Name { get; set; } public string Address { get; set; } } and I need to fill in the ...
Mayank Gupta's user avatar
0 votes
2 answers
293 views

Invoke async Func stored in a Dictionary

I have a class that is responsible of storing a bunch of async Funcs to execute them later. The signature of each Func differs only on the Task type. Here is the class: public class FuncStore<...
amedina's user avatar
  • 3,226
-1 votes
1 answer
318 views

Combine 2 Lists, List<Expression<Func>> with OR between them and OR/AND between items [duplicate]

I have 2 lists List<Expression<Func<MyClass, bool>>> andConditions = new List<Expression<Func<MyClass, bool>>>(); List<Expression<Func<MyClass, bool>&...
TheBoubou's user avatar
  • 19.8k
-1 votes
1 answer
145 views

C# any Lambda Statement as Parameter

I have the following problem: I need to create function which takes any Lambda (with any parameters/return type) as a parameter. For lambda expressions it works fine with this type: LambdaExpression ...
Stevie's user avatar
  • 419
0 votes
1 answer
133 views

merge expressions to use the same lambda parameter [duplicate]

having an array of Expression<Func<T, string>> and a string str which could have a value like this: { m => m.FirstName, m => m.LastName} I wanted to generate a Lambda expression that ...
buga's user avatar
  • 1,066
-1 votes
1 answer
200 views

Linq query timeout for table

I have many tables that I need to query data to see if a certain parameter(isCorrect) is yes. This field is present in all the tables. I have built a dynamic query using generic type. But im getting ...
user20565161's user avatar
1 vote
1 answer
563 views

.NET Core IQueryable Lambda Memory Leak

I am using a lambda query as below on a column with a Unique index in the table. For each request, approximately 8 -12 kb memory leak occurs. This method will be called approximately 10-20 times per ...
ahomag's user avatar
  • 21
2 votes
1 answer
216 views

Pass a lambda or an async lambda for execution? Are there tradeoffs? [duplicate]

I'm trying to understand the consequences of two approaches to passing a lambda into an async method that executes the lambda. The below example distills the two approaches. In the first approach, ...
Suraj's user avatar
  • 36.3k
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 ...
Tim Allemann's user avatar
0 votes
2 answers
51 views

Filter the list based on a list inside

I have this models public class ModelA { public int Id { get; set; } public string Name { get; set; } public List<ModelB> ModelBClass { get; set; } } public class ModelB { ...
Code Boy's user avatar

15 30 50 per page
1
2 3 4 5
75