diff --git a/YD_Event.Application/Event/EventService.cs b/YD_Event.Application/Event/EventService.cs index 3acc6f4..fadef76 100644 --- a/YD_Event.Application/Event/EventService.cs +++ b/YD_Event.Application/Event/EventService.cs @@ -88,7 +88,6 @@ public class EventService : BaseService, ITransient .WhereIF(input.EventType.HasValue, x => x.EventType == input.EventType) .WhereIF(input.ChargeMode.HasValue, x => x.ChargeMode == input.ChargeMode) .WhereIF(input.EventStatus.HasValue, x => x.EventStatus == input.EventStatus) - .WhereIF(!input.EventStatus.HasValue, x => x.EventStatus != EventStatus.NotStarted && x.EventStatus != EventStatus.Ended) .WhereIF(input.RegistrationStartTime.HasValue, x => x.RegistrationStartTime >= input.RegistrationStartTime) .WhereIF(input.RegistrationEndTime.HasValue, x => x.RegistrationEndTime <= input.RegistrationEndTime) .WhereIF(input.MatchStartTime.HasValue, x => x.MatchStartTime >= input.MatchStartTime) diff --git a/YD_Event.Application/Event/UserEventRegistrationService.cs b/YD_Event.Application/Event/UserEventRegistrationService.cs index 23d27d2..254eb88 100644 --- a/YD_Event.Application/Event/UserEventRegistrationService.cs +++ b/YD_Event.Application/Event/UserEventRegistrationService.cs @@ -170,6 +170,7 @@ public class UserEventRegistrationService : IDynamicApiController, ITransient .Where(x => x.Status == AvailabilityStatus.Enable) .WhereIF(!string.IsNullOrWhiteSpace(input.Keyword), x => x.EventName.Contains(input.Keyword)) .WhereIF(input.Status.HasValue && input.Status != 0, x => x.EventStatus == input.Status) + .WhereIF(!input.Status.HasValue || input.Status == 0, x => x.EventStatus != EventStatus.NotStarted && x.EventStatus != EventStatus.Ended) .WhereIF(input.Type.HasValue, x => x.EventType == input.Type) .WhereIF(input.StartTime.HasValue, x => x.MatchStartTime >= input.StartTime) .WhereIF(input.EndTime.HasValue, x => x.MatchEndTime <= input.EndTime)