public Entities.Event GetEventByName(string eventName) { var eventNameFilter = new SearchFilter<Entities.Event> { Conditional = SearchConditional.Equals, PropertyName = "Name", PropertyValue = eventName }; var eventSearchCriteria = new EventsSearchCriteria { Filters = new List<SearchFilter<Entities.Event>> {eventNameFilter} }; return Repository.List<Entities.Event>(eventSearchCriteria.BuildCriteria()).FirstOrDefault(); }
public IEnumerable<Entities.Event> FindEvents(EventsSearchCriteria searchCriteria) { return Repository.List<Entities.Event>(searchCriteria.BuildCriteria()); }