Home > Net >  [question] c # linq return more than aggregate project question
[question] c # linq return more than aggregate project question

Time:03-16

 private string sales; 
Private string deviceId;
Private string itemcode;
Private DateTime starthour;
Private DateTime endhour;
Private decimal hourvalue;
private int state;


DeviceId for unique key sales collocation, this table every data are based on per hour (hourly) written to the database, itemcode have four classes, therefore, each hour each unique key will write four pens in the data table,


I have the Database structure, want to use Linq queries from the 2021-03-11 15:00:00 beginning, end of the 2021-03-11 21:00:00 'different itemcode hourvalue value return interval, itemcode only four classes (jacket, trousers, jacket, shirt), hope to return to the following results:
 {
"Response" : {
"QueryType" : 0,
//hour"DeviceId" : "* (A",
"Sales" : "Jerry,"
"Data" : [{
"Top" : 131,
"Pants" : 77,
"Coat" : 0,
"Shirt" 0,
"Starthour" : "the 2021-03-11 15:00:00
""Endhour" : "the 2021-03-12 16:00:00
"},
.
.
.
.
}]
}


Would like to ask how the grammar? Bother you guidance... Thank you.
  •  Tags:  
  • LINQ
  • Related