Questions tagged [linq]

Language INtegrated Query (LINQ) is a Microsoft .NET Framework component that adds native data querying capabilities to .NET languages.

15 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
5 votes
0 answers
134 views

Implement Sudoku using LINQ

WiKi and GitHub. Sudoku rules are being checked with the following tests: ...
Dmitry Nogin's user avatar
  • 6,123
4 votes
0 answers
139 views

Repository pattern method implementation with entity framework and C#

I have two entities in my database: Employee and Shift. I want to implement a C# repository pattern method, that given two ...
Jens Jensen's user avatar
3 votes
0 answers
41 views

Configure multiple application features by common criteria

My FeatureSerivce provides only basic APIs, so it is good in dealing with single features. Like I can configure only one feauture at a time: ...
t3chb0t's user avatar
  • 44.1k
2 votes
0 answers
103 views

LINQ extensions for sequence comparing

The desired behavior would be: ...
Dmitry Nogin's user avatar
  • 6,123
2 votes
0 answers
263 views

Handler for jQuery DataTable search with filters and pagination

This AjaxCompound is invoked every time when the user types a key for search or click to sort. It contains 1million data 10 distinct rows by compound name. It takes 1.1 minutes and return only 1-5 KB ...
Ujwal Neupane's user avatar
2 votes
0 answers
125 views

Implementing the IQueryable counterpart method of the IEnumerable method?

I have created this method to simulate SQL's IN operator: ...
mshwf's user avatar
  • 121
2 votes
0 answers
311 views

Entity Join slow query

I've never participated in a codereview before and I was pointed that I should in another thread for a slow query. ...
Cowmoogun's user avatar
  • 129
2 votes
0 answers
14k views

Retrieving Primary Key from Entity Framework entity

Entity Framework (version 6) generates classes based on your tables that look like this (where each property represents a field in the table): ...
Kai's user avatar
  • 449
1 vote
0 answers
53 views

Optimizations on a function that fIlters a list of connections

Hello fellow programmers, I am currently implementing a function and wanted to know if there was anything I could change to simplify the code, make it more readable, or to optimize the running time ...
Oscar Anthony's user avatar
1 vote
0 answers
1k views

SelectAsync With Max Degree Of Parallelism

I have been looking for the best approach to creating an extension method that would give me the ability to select in a linq query using async/await with a max degree of parallelism. I'm aware that ...
TheRock's user avatar
  • 171
1 vote
0 answers
387 views

Generic search service to filter entries in lists

I'm in the process of implementing a fully generic service to filter out entries (of any type), which are contained in a ICollection. As it is generic, without any ...
Philippe's user avatar
  • 111
1 vote
0 answers
117 views

Getting all descendants IWebElements (using XPath) is too slow in Selenium

Well, I'm working with Selenium to scrape a webpage that has obfuscated class names (example <div class="example-gHJkLM">...)... So I needed to ...
z3nth10n's user avatar
  • 227
1 vote
0 answers
1k views

E-Commerce Mock App in Console

I have completed this E-Commerce Mock App in Console C# which I used object to store the data to apply some C# OOP and LINQ techniques. Since it is just a mock version, features are reduced to the ...
Steve Ngai's user avatar
0 votes
1 answer
140 views

Optimizing LINQ Query on C# Web API

Can someone help me optimize this code especially the LINQ query. It takes 8-12 seconds just to return a response when I'm calling the endpoint. Its super slow, and my whole endpoint call is taking ...
Kraust123's user avatar
0 votes
0 answers
236 views

Join via navigation properties with collection

There are some related collection objects in my table and I'm trying to get list with joining this tables. But this code is seems bad: Entities that shortened: User: ...
Tugrul Emre Atalay's user avatar