Exemplo n.º 1
0
        public static INhFetchRequest <TQueried, TRelated> ThenFetchMany <TQueried, TFetch, TRelated>(
            this INhFetchRequest <TQueried, TFetch> query, Expression <Func <TFetch, IEnumerable <TRelated> > > relatedObjectSelector)
        {
            ArgumentUtility.CheckNotNull("query", query);
            ArgumentUtility.CheckNotNull("relatedObjectSelector", relatedObjectSelector);

            var methodInfo = ((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TQueried), typeof(TFetch), typeof(TRelated));

            return(CreateFluentFetchRequest <TQueried, TRelated>(methodInfo, query, relatedObjectSelector));
        }
        public static INhFetchRequest <TQueried, TRelated> ThenFetchMany <TQueried, TFetch, TRelated>(
            this INhFetchRequest <TQueried, TFetch> query, Expression <Func <TFetch, IEnumerable <TRelated> > > relatedObjectSelector)
        {
            if (query == null)
            {
                throw new ArgumentNullException(nameof(query));
            }
            if (relatedObjectSelector == null)
            {
                throw new ArgumentNullException(nameof(relatedObjectSelector));
            }

            var methodInfo = ((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TQueried), typeof(TFetch), typeof(TRelated));

            return(CreateFluentFetchRequest <TQueried, TRelated>(methodInfo, query, relatedObjectSelector));
        }
Exemplo n.º 3
0
 //this is the real deal for NHibernate queries
 internal NhFetch(INhFetchRequest <TQuery, TFetch> realFetchRequest)
 {
     this.NhFetchRequest = realFetchRequest;
 }
Exemplo n.º 4
0
 public FetchRequest(INhFetchRequest <TQueried, TFetch> nhFetchRequest)
 {
     this.NhFetchRequest = nhFetchRequest;
 }
Exemplo n.º 5
0
 public NHibernateFetchRequest(INhFetchRequest <TOriginatingEntity, TFetch> source) : base(source)
 {
 }
 public static NhFetchHelper <TQuery, TFetch> Create <TQuery, TFetch>(
     INhFetchRequest <TQuery, TFetch> nhFetch)
 {
     return(new NhFetchHelper <TQuery, TFetch>(nhFetch));
 }
 //this is the real deal for NHibernate queries
 internal NhFetchHelper(INhFetchRequest <TQuery, TFetch> realFetchRequest)
 {
     this.realFetchRequest = realFetchRequest;
 }
Exemplo n.º 8
0
 public NHFetchRequest(INhFetchRequest <TQueried, TFetch> nhFetchRequest)
 {
     NhFetchRequest = nhFetchRequest;
 }
Exemplo n.º 9
0
 public static INhFetchRequest <TQueried, TRelated> ThenFetchMany <TQueried, TFetch, TRelated>(this INhFetchRequest <TQueried, TFetch> query, Expression <Func <TFetch, IEnumerable <TRelated> > > relatedObjectSelector)
 {
     return(EagerFetchingExtensionMethods.ThenFetchMany(query, relatedObjectSelector));
 }