Questions tagged [linq]
Language Integrated Query (LINQ) is a Microsoft .NET Framework component that adds native data querying capabilities to .NET languages, although ports exist for Java, PHP, JavaScript and ActionScript.
89 questions
3 votes
4 answers
720 views
Sorting a sequence according to a hierarchical set of rules
We are producing configuration files for a production system. The configuration files have a dynamic set of variables. Optional values and other values that only need to exist based on other values. ...
-1 votes
2 answers
483 views
What makes LINQ (C#) unique compared to another DSL such as Django query syntax?
My question to the community is this: What makes C#'s LINQ Unique from other query language in other languages and frameworks, or does it not have anything to make it unique at this point? ...
1 vote
1 answer
60 views
Finding Event-Oriented Patterns in temporal sequence
I have a 24 hour "sliding window" sequence of "start" and "stop" events in memory comming from an iOT device. I'm only interrested in finding "stop" events followed by "start" events in order to ...
0 votes
0 answers
195 views
Tradeoffs between Testability and Performance when filtering using SQL vs LINQ
My team has recently decided to adopt the CQRS pattern similar to the one used in the famous Microsoft EShopsOnContainers repository. In this solution, the queries are made in Query classes using ...
2 votes
0 answers
74 views
How to join two sets of 6 tables and select the list into another set of 6 tables
A1 |__A2 |__A3 |__A4 |__A5 B1 |__B2 |__B3 |__B4 |__B5 C1 |__C2 |__C3 |__C4 |__C5 Given a list of A and a list of B, we want to "join" the ...
43 votes
13 answers
31k views
Is it unreasonable to expect Any() *not* to throw a null reference exception?
When you create an extension method you can, of course, call it on null.But, unlike an instance method call, calling it on null doesn't have to throw a NullReferenceException -> you have to check and ...
20 votes
6 answers
4k views
What advantage was gained by implementing LINQ in a way that does not cache the results?
This is a known pitfall for people who are getting their feet wet using LINQ: public class Program { public static void Main() { IEnumerable<Record> originalCollection = ...
2 votes
4 answers
219k views
Null or empty object when LINQ to Entities query returns nothing
Say I have a LINQ query like this: application = CreditDatabase .Applications .Select(Mapper.Map<Application>) .Where(c =...