Skip to content

Instantly share code, notes, and snippets.

View moaschterle's full-sized avatar

Rudi Thoeni moaschterle

View GitHub Profile
private IEnumerable<ActivityPoiReduced> GetAllPoiReduced(string language, string activitytype, List<string> tvlist, List<string> subtypelist, List<string> arealist, List<string> mysmgtaglist, bool highlight)
{
using (var session = documentStore.OpenSession())
{
var activityquery = session.Query<PoiBaseInfos, ActivityPoiMegaFilterMM>()
.Where(x => x.Type == activitytype)
.WhereIf(tvlist.Count > 0, x => x.TourismorganizationId.In(tvlist))
.WhereIf(subtypelist.Count > 0, x => x.SubType.In(subtypelist))
.WhereIf(mysmgtaglist.Count > 0, x => x.SmgTags.In(mysmgtaglist))
.WhereIf(highlight, x => x.Highlight == true)
//also des isch der Index
public class EventMegaFilter : AbstractIndexCreationTask<Event>
{
/// <summary>
/// Filter ACtivities and POIs by
/// SMGActive, Type, Subtype, Region, TV, SMG Tags
/// </summary>
public EventMegaFilter()
{