public bool HasPenalty(int attendeeId, DateTime newDate, int roomId) { Penalty penalty = penaltyRepository.GetPenaltiesByUser(attendeeId) .FirstOrDefault(p => p.Date.AddDays(15) >= newDate); if (penalty != null) { return(true); } return(false); }
public bool HasPenalty(int attendeeId, DateTime newDate, int roomId) { Penalty penalty = penaltyRepository.GetPenaltiesByUser(attendeeId) .FirstOrDefault(p => p.Date.AddDays(15) >= newDate); if (penalty != null) { return(true); } return(false); }