public Event[] GetAllFutureEvents() { return(GetSession().CreateQuery( "from Event e where e.EndDate >= :datetime order by e.StartDate") .SetDateTime("datetime", SystemClockFactory.Default().Now().Midnight()) .List <Event>().ToArray()); }
public Event[] GetFutureForUserGroup(UserGroup usergroup) { return(GetSession().CreateQuery( "from Event e where e.UserGroup = :usergroup and e.EndDate >= :datetime order by e.StartDate") .SetEntity("usergroup", usergroup) .SetDateTime("datetime", SystemClockFactory.Default().Now().Midnight()) .List <Event>().ToArray()); }