コード例 #1
0
 internal CollectionPropertyMapping(
     ICollectionAggregation <TEntityType, TCollectionEntityType> collection,
     Expression <Func <TCollectionEntityType, TPropertyType> > property
     )
 {
     this.collection = collection;
     this.property   = property;
 }
コード例 #2
0
 internal CollectionWhere(
     CollectionMapping <TRootEntityType> collectionMapping,
     Expression <Func <TCollectionEntityType, ICollection <TSubCollectionType> > > collectionExpression)
 {
     this.collection           = null;
     this.collectionMapping    = collectionMapping;
     this.collectionExpression = collectionExpression;
 }
コード例 #3
0
 internal CollectionWhere(
     ICollectionAggregation <TRootEntityType, TCollectionEntityType> collection,
     Expression <Func <TCollectionEntityType, ICollection <TSubCollectionType> > > collectionExpression)
 {
     this.collectionMapping    = null;
     this.collection           = collection;
     this.collectionExpression = collectionExpression;
 }
コード例 #4
0
 internal CollectionAggregation(
     AggregateOperation operation,
     CollectionMapping <TRootEntityType> collectionMapping,
     Expression <Func <TCollectionEntityType, ICollection <TSubCollectionType> > > collectionExpression)
 {
     this.collection           = null;
     this.operation            = operation;
     this.collectionMapping    = collectionMapping;
     this.collectionExpression = collectionExpression;
 }
コード例 #5
0
        /// <summary>
        /// Generate the actual mapping object by navigating to a property.
        /// </summary>
        /// <typeparam name="TEntityType">The root entity type that we are creating a mapping for</typeparam>
        /// <typeparam name="TCollectionEntityType">The type of object we are getting the property of</typeparam>
        /// <typeparam name="TPropType">The property to access</typeparam>
        /// <param name="collection">The collection filter expression that identifies the collection</param>
        /// <param name="cpop">The expression to the property</param>
        /// <returns>A mapping object from <typeparamref name="TEntityType"/> to <typeparamref name="TPropType"/></returns>
        public static CollectionPropertyMapping <TEntityType, TCollectionEntityType, TPropType> Property <TEntityType, TCollectionEntityType, TPropType>(
            this ICollectionAggregation <TEntityType, TCollectionEntityType> collection,
            Expression <Func <TCollectionEntityType, TPropType> > cpop
            )
            where TEntityType : class
            where TCollectionEntityType : class
        {
            // todo, check cpop is actually a property

            return(new CollectionPropertyMapping <TEntityType, TCollectionEntityType, TPropType>(collection, cpop));
        }
コード例 #6
0
 Any <TRootEntityType, TCollectionEntityType, TCollectionEntityCollectionType>(
     this ICollectionAggregation <TRootEntityType, TCollectionEntityType> collection,
     Expression <Func <TCollectionEntityType, ICollection <TCollectionEntityCollectionType> > > collectionExpression
     )
     where TRootEntityType : class
     where TCollectionEntityType : class
     where TCollectionEntityCollectionType : class
 {
     return(new CollectionAggregation <TRootEntityType, TCollectionEntityType, TCollectionEntityCollectionType>(
                AggregateOperation.Any,
                collection,
                collectionExpression
                ));
 }