Example #1
0
        public IActionResult GetProgressRecordsForClassEntityAndWeek(string classEntityOwnerIdentityName, int weekId)
        {
            if (!_repo.ClassEntityExists(classEntityOwnerIdentityName) ||
                !_repo.WeekExists(weekId))
            {
                return(NotFound());
            }

            //var results = new List<CityWithoutPointsOfInterestDto>();
            var progressRecordsToReturn = _repo.GetAllProgressRecordsFromClassAndWeek(classEntityOwnerIdentityName, weekId);
            var results = _mapper.Map <IEnumerable <ProgressRecordDto> >(progressRecordsToReturn);


            return(Ok(results));
        }