How would I go about ordering items in the ToDoList sample app? #597
Unanswered
canuckotter
asked this question in
Q&A
Replies: 1 comment
-
i would take a step back and either do the ordering using angular or look at Linq to get started with data |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm playing with the default sample app to get a feel for how to approach things, and the first thing that popped into my head was that if I've marked a ToDo item as High priority, I'd prefer to see it pop to the top of the list. But that page (at least in the version I got from running
dotnet new --install Clean.Architecture.Solution.Template
) uses the GetTodosQuery... The Lists object that's returned gets populated with unsorted/default-sorted items, and I don't know how to sort it. I injected it in a way that feels pretty brute-force:My instinct is that if I want to sort the items within each list when returning from here, it might make sense to do so in the ProjectTo call? But there doesn't seem to be an obvious way to do so. I'm pretty sure my solution is a goofy way to do it though!
So what would be an appropriate way to change the sorting of that list?
Beta Was this translation helpful? Give feedback.
All reactions