示例#1
0
        public async Task <IActionResult> Details(Guid id)
        {
            var goal = await _repo.GetGoal(id);

            if (goal == null)
            {
                return(NotFound());
            }

            var model = new SavingsGoalProgressViewModel();

            model.SavingsGoal = goal;
            model.Progress    = await _repo.CalculateProgress(goal);

            return(View(model));
        }