Beispiel #1
0
        /// <summary>
        /// <paramref name="queryOver"/>를 <paramref name="statelessSession"/>에서 수행할 수 있는 <see cref="IQueryOver{T,T}"/> 를 생성합니다.
        /// </summary>
        /// <typeparam name="T"></typeparam>
        /// <param name="statelessSession"></param>
        /// <param name="queryOver"></param>
        /// <returns></returns>
        public static IQueryOver <T, T> GetExecutableQueryOver <T>(this IStatelessSession statelessSession, QueryOver <T> queryOver)
        {
            statelessSession.ShouldNotBeNull("statelessSession");
            queryOver.ShouldNotBeNull("queryOver");

            return(queryOver.GetExecutableQueryOver(statelessSession));
        }
Beispiel #2
0
        /// <summary>
        /// <paramref name="queryOver"/> 인스턴스를 <paramref name="session"/>에서 수행할 수 있는 <see cref="IQueryOver{T,T}"/> 를 생성합니다.
        /// </summary>
        /// <typeparam name="T"></typeparam>
        /// <param name="session"></param>
        /// <param name="queryOver"></param>
        /// <returns></returns>
        public static IQueryOver <T, T> GetExecutableQueryOver <T>(this ISession session, QueryOver <T> queryOver)
        {
            session.ShouldNotBeNull("session");
            queryOver.ShouldNotBeNull("queryOver");

            var result = queryOver.GetExecutableQueryOver(session);

            return(result);
        }
Beispiel #3
0
        /// <summary>
        /// <paramref name="period"/>의 구간이 엔티티의 상하한 구간 (<paramref name="loExpr"/> ~ <paramref name="hiExpr"/> )과 겹치는지 검사하는 질의어를 추가합니다.
        /// </summary>
        /// <typeparam name="TRoot"></typeparam>
        /// <typeparam name="TSub"></typeparam>
        /// <param name="queryOver">QueryOver 인스턴스</param>
        /// <param name="period">검색 기간</param>
        /// <param name="loExpr">하한 값 표현식</param>
        /// <param name="hiExpr">상한 값 표현식</param>
        /// <returns></returns>
        public static QueryOver <TRoot, TSub> AddIsOverlap <TRoot, TSub>(
            this QueryOver <TRoot, TSub> queryOver,
            ITimePeriod period,
            Expression <Func <TSub, object> > loExpr,
            Expression <Func <TSub, object> > hiExpr)
        {
            queryOver.ShouldNotBeNull("queryOver");

            queryOver.UnderlyingCriteria.Add(IsOverlapCriterion(period, loExpr, hiExpr));
            return(queryOver);
        }