Fluent api returning Events in draft status?
eventList= App.WorkWith()
.Events().Where(ev => ev.Status == ContentLifecycleStatus.Live && ev.Visible == true)
.Publihed().Get().ToList();
Hello Jimmy,
Thank you for contacting us.
There is no NotDraft() or similar way to filter our the events in draft status. However when using Published() should get only the items that are published and scheduled for publishing. This is the filter implementation we have in the Published() method:
return
(item) => item.Visible ==
true
&&
item.Status == ContentLifecycleStatus.Live &&
item.PublicationDate <= DateTime.UtcNow &&
(item.ExpirationDate ==
null
|| item.ExpirationDate > DateTime.UtcNow);
var eventList = App.WorkWith()
.Events().Published().Get().ToList();