public IHttpActionResult GetInactiveAthletes() { var request = new GetInactiveAthletesRequest(); var inactiveAthletes = _athleteService .GetInactiveAthletes(request) .InactiveAthletes; return Ok(inactiveAthletes); }
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 }; }