示例#1
0
        public IQueryOver <TEntity> LeftJoin <TOther>(Expression <Func <TEntity, object> > entity,
                                                      Expression <Func <TOther, object> > other)
            where TOther : class, new()
        {
            var action = new LeftJoinAction <TEntity, TOther>(_metadatastore);

            action.Enqueue(entity, other);
            _queryDefinition.AddJoin(action);
            return(this);
        }
示例#2
0
        public IQuery <TParentEntity> LeftJoinOn <TChildEntity>(Expression <Func <TChildEntity, object> > child,
                                                                Expression <Func <TParentEntity, object> > parent)
            where TChildEntity : class, new()
        {
            var leftJoinAction = new LeftJoinAction <TParentEntity, TChildEntity>(_metadatastore);

            leftJoinAction.Enqueue(parent, child);
            _joinActions.Add(leftJoinAction);
            return(this);
        }
示例#3
0
        public void AddJoin <TLeft, TRight>(LeftJoinAction <TLeft, TRight> action)
            where TLeft : class, new()
            where TRight : class, new()
        {
            TryAddEntity(typeof(TLeft));
            TryAddEntity(typeof(TRight));

            if (_joins.Contains(action) == false)
            {
                _joins.Add(action);
            }
        }