コード例 #1
0
        public IHttpActionResult GetInactiveAthletes()
        {
            var request = new GetInactiveAthletesRequest();

            var inactiveAthletes =
                _athleteService
                .GetInactiveAthletes(request)
                .InactiveAthletes;

            return Ok(inactiveAthletes);
        }
コード例 #2
0
ファイル: AthleteService.cs プロジェクト: ChrisGatzo/GymHub
        public GetInactiveAthletesResponse GetInactiveAthletes(GetInactiveAthletesRequest request)
        {
            var inactiveAthletes =
              _unitOfWork.AthleteRepository
              .Get(t => t.AthleteCheckIns
                  .All(c => c.CheckInDateTime.Day != DateTime.Today.Day
                      || c.CheckInDateTime.Month != DateTime.Today.Month
                      || c.CheckInDateTime.Year != DateTime.Today.Year));

            return new GetInactiveAthletesResponse
            {
                InactiveAthletes = inactiveAthletes
            };
        }