private async Task Filter() { IEnumerable <RoomInfo> collection = null; if (DateTimeSpan.IsTimeInclude && DateTimeSpan.Validate()) { collection = await _roomRepository.FilterRooms(DateTimeSpan.FromDate, DateTimeSpan.ToDate, DateTimeSpan.FromTime, DateTimeSpan.ToTime); } else if (DateTimeSpan.IsDateValidate()) { collection = await _roomRepository.FilterRooms(DateTimeSpan.FromDate, DateTimeSpan.ToDate); } if (collection != null) { RoomInfoColleciton = new ObservableCollection <RoomInfo>(collection); } else { RoomInfoColleciton.Clear(); } }