I have a question about the MVC in the ASP.net Core world.
I have a userModel with data about my user and a Model with some useractivities. Like what they bought and when they bought it etc.
I want to create a dashboard for every user. So that i can see what they bought, how much they bought. E.g. bought in a month in percent. My Question is how do i implement this in ASP.net core MVC.
Do i have to put the Logic for the percent calculation in the Controller and return it to the view with a viewbag?
Or do i have to create a Model with that informations? Example:
UserStatsModel
Int UserID
String Name
Double OrdersPerMonth …
And return this Model to the View?
Or is both valid?