public EventMetadata ToMetadata(DateTime from, DateTime to) { var allEventOccurrences = Finish.Occur(RepeatPeriod, Start, from, to).ToList(); allEventOccurrences.RemoveAll(x => DeletedOccurrences.Contains(x)); allEventOccurrences.RemoveAll(x => EditedEvents.Select(y => y.OldStartDate).Contains(x)); return(new EventMetadata { Id = Id, Title = Title, Duration = Duration.EventDurationTimeSpan, Start = allEventOccurrences }); }