Reviewing Project Files (2)
Take a deeper look at Index function in controller class.
- In line 23, it shows a variable initialization to call getEntries() function in entriesRepository class.
- In line 26, it being used to count the duration of the activities only when the Exclude parameter set to false.
- In line 31, it counts user's active days from the entries that will be used to calculate the average working days.
- In line 36, it stores the totalActivity value to ViewBag.TotalActivity that could be passed from controller to view.
Now, Index.cshtml.
- In line 7, there is a div tag like usual that holds averagedailyactivity and totalactivity from controller class.
- The other lines tell about html markup tags to create a view in our webpage.
- Notice the Action function when the button being pressed.