Skip to main content

All Questions

Tagged with
1 vote
1 answer
89 views

EF Core : retrieve products with all supplier prices for price comparison and identify cheapest supplier

I'm working on an ASP.NET Core application using ABP framework and EF Core. I need to retrieve information about products and their suppliers for comparison purposes. Specifically, I want to achieve ...
aabdan's user avatar
  • 131
1 vote
1 answer
94 views

how to perform a sequential pivot in an MS ACCESS database in dapper with VB.NET

I'm trying to perform a sequential pivot in an MS ACCESS database in dapper with VB.NET I have the code below, but this is still wrong. is there any other method please guide me Thanks Public Class ...
user avatar
0 votes
1 answer
318 views

Pivot List of Object C# MVC Solution

In my controller I am returning a db query result (list of objects) defined by my model. I'm displaying this in the view. For example: prop1 prop2 prop3 prop4 prop5 AAA 1123 400 35% $600 BBB 3444 ...
Adam's user avatar
  • 17
1 vote
0 answers
47 views

How to use pivot in LINQ efficiently?

I searched for how to do pivot data with LINQ and found THIS I am trying apply this for my OData API service. Table Data has composite key as { Id, Name, DataType }. Table Analyses has key as Id. So, ...
Nox's user avatar
  • 41
0 votes
1 answer
63 views

mongo to linq pivot/unpivot data

I have a mongo collection like below: date: "2022-03-09" dryMinTemp: "12.14" dryMaxTemp: "14.06" wetMinTemp: "28.08" wetMaxTemp: "12.14" dryHour: &...
user16251127's user avatar
0 votes
0 answers
469 views

Pivot table and change DataTable format

I'm pivoting a table using the method ToPivotTable and it works well and I want to display the value with thousand separator like this ( 100 000,00) but I can't. I tried to put [DisplayFormat(...
Abdelkhalek309's user avatar
0 votes
1 answer
208 views

Linq Pivot from SQL Query

I have problem with Linq, the code used to be processed in sql via stored procedure, but right now it supposed to be on code via linq, here's my database schema SQL Fiddle what I want is , from this ...
Sabilv's user avatar
  • 600
0 votes
2 answers
268 views

Unable to pivot C# datatable based on two columns

I am having a C# datatable with three columns. This is how the table looks: DataTable dt = new DataTable(); dt.Columns.Add("Name", typeof(string)); dt.Columns.Add(&...
SharpCoder's user avatar
  • 18.8k
0 votes
3 answers
175 views

How to loop through the properties of anonymous type in a list

If I have the following LINQ query: var outstandingDataTotalData = from t1 in dtTotal.AsEnumerable() join t2 in dtOutstandingData.AsEnumerable() on ...
Anyname Donotcare's user avatar
0 votes
0 answers
250 views

Transpose rows and columns in LINQ without aggregate

I've store data for each collecting parameter in ObservableCollection<DataValue> collection: public sealed class DataValue: BaseModel { private int _id; public int ID ...
amaranth's user avatar
  • 979
1 vote
0 answers
291 views

Dynamic Pivot List in Linq C#

I have three table Product, Location, StockLocation. I want to show data like that where location show as column and it should be dynamic: I want to populate data in my asp.net core API application ...
Shahid MAB's user avatar
1 vote
1 answer
582 views

How to convert rows to columns in LINQ

I have first output in the image and I want to convert it to second output in image using LINQ Core. Is there and direct unpivot option in LINQ. I am able to write the code for PIVOT and UNPIVOT in ...
Shardul's user avatar
  • 339
0 votes
1 answer
24 views

SQL Pivot Data with Group

I have this query: SELECT TOP (1000) count([CallId]) as totalCalls ,[CallDirection] ,[AssignedWorkGroup] ,DATEPART(month, connectedDate) as SelectedMonth FROM [mydatabase].[dbo].[...
Rondakay's user avatar
  • 150
3 votes
3 answers
11k views

How to pivot a list in C#

I have a list with following structure, TimeStamp Name Value --------------------------------------- 01/May/2018 Prop1 5 07/May/2018 Prop1 9 01/...
Simsons's user avatar
  • 12.6k
1 vote
2 answers
70 views

LINQ query to retrieve pivoted data taking too long

I am working on a LINQ query which includes some pivot data as below var q = data.GroupBy(x => new { x.Med.Name, x.Med.GenericName, ...
DoIt's user avatar
  • 3,398

15 30 50 per page