private bool HasCategories(Event @event) { var eventCategories = @event.EventCategories .Select(eventCategory => eventCategory.Category.Name); return(RequiredCategories == null || RequiredCategories .All(filterCategory => eventCategories .Contains(filterCategory))); }
private bool HasCategories(EventViewModel @event) { return(RequiredCategories == null || RequiredCategories .All(requiredCategory => @event.Categories.Contains(requiredCategory))); }