Esempio n. 1
0
        public WorkoutSetViewModel(IWorkoutService workoutService, int userId)
        {
            UserId          = userId;
            UserTotalResult = workoutService.GetUserTotalResult(userId);
            var lastSet  = workoutService.GetSets(userId).OrderByDescending(_ => _.Id).FirstOrDefault();
            var lastReps = lastSet?.Reps ?? 50;

            Reps = lastReps;
        }
Esempio n. 2
0
        public ActionResult History(int userId)
        {
            var sets = _WorkoutService.GetSets(userId).ToList();

            return(View(sets));
        }