Questions tagged [linq]

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

20 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
5 votes
0 answers
122 views

Implement Sudoku using LINQ

WiKi and GitHub. Sudoku rules are being checked with the following tests: ...
user avatar
  • 6,123
4 votes
0 answers
131 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 ...
user avatar
3 votes
0 answers
40 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: ...
user avatar
  • 43.8k
2 votes
0 answers
105 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 ...
user avatar
  • 121
2 votes
0 answers
96 views

LINQ extensions for sequence comparing

The desired behavior would be: ...
user avatar
  • 6,123
2 votes
0 answers
250 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 ...
user avatar
2 votes
0 answers
120 views

Implementing the IQueryable counterpart method of the IEnumerable method?

I have created this method to simulate SQL's IN operator: ...
user avatar
  • 121
2 votes
0 answers
305 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. ...
user avatar
  • 129
2 votes
0 answers
13k 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): ...
user avatar
  • 449
1 vote
0 answers
51 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 ...
user avatar
1 vote
0 answers
803 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 ...
user avatar
  • 171
1 vote
0 answers
76 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 ...
user avatar
  • 227
1 vote
0 answers
849 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 ...
user avatar
1 vote
0 answers
45 views

Querying a database to find notifications to comments

I have a solution what I think is not the best, and I want to make this not so expensive. I'm using MVC 5 + SignalR (hubs) + EF + UnitOfWork + Generic Repos. I have a table ...
user avatar
1 vote
0 answers
28 views

get ProductFilters in hierarchy table

I have two tables : Category and ProductFilter. Category table is hierarchy and I have depth ...
user avatar
1 vote
0 answers
228 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: ...
user avatar
1 vote
0 answers
2k views

Create JSON object from self-nested LINQ query

I created this function to created nested JSON object using a Linq query. How can I optimize this and make it more readable? ...
user avatar
1 vote
0 answers
4k views

Populating Charts with Chart.js

I have a dashboard page which populates some charts. They execute a Linq query to then transform the data into Json to populate the Chart. These charts maybe used throughout the site, so I am ...
user avatar
  • 255
1 vote
0 answers
76 views

Query against history table

I have this linq query that queries a table that retains any change history done to any of the tables is constructed like this: ...
user avatar
0 votes
0 answers
68 views

GCD Groups with list

We have a list. divide the list element into two groups such that when the product of the numbers of two groups is taken and their GCD is calculated, it came out to be 1. Answer the number of ways in ...
user avatar