❔ rename tuple
is returning
item1: [{…}]
item2: 1
How can I rename it to sales and totalSales
16 Replies
I'd probably just use a record here instead of a tuple
But
return (sales: sales, totalSales: sales.Count())
should work
With the return type being
Task<(List<SalesReportEntity> sales, int totalSales)>
this not necessary actually, if you specify the names in the return type
wont change :-:
Cyberrex#8052
REPL Result: Success
Result: string
Compile: 444.748ms | Execution: 52.984ms | React with ❌ to remove this embed.
huh
I guess STJ doesn't serialize named tuples
Thankfully, solution is simple: just use a record
you right
return new SalesResume(sales, sales.Count());
idk if I did best way
I'd just keep the record next to the method tbh, no need to make a whole separate file for it
But, sure, it works either way
Interface need to be typed as well
I'd prefer but I couldnt
Yeah, understandable
thanks
Was this issue resolved? If so, run
/close
- otherwise I will mark this as stale and this post will be archived until there is new activity.