Пример #1
0
 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());
 }
Пример #2
0
 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());
 }