Exemplo n.º 1
0
 ISqlSelect ISqlSelect.AddFields<TEntity>(SqlAlias<TEntity> alias,
     params Expression<Func<TEntity, object>>[] fields)
 {
     if (alias == null)
         MetadataProvider.AliasFor<TEntity>();
     return AddFields(alias, fields);
 }
Exemplo n.º 2
0
        public SqlSelect<T> FullJoin<TLeft, TJoin>(Expression<Func<TLeft, TJoin, bool>> condition,
            SqlAlias<TLeft> leftAlias = null, SqlAlias<TJoin> joinAlias = null)
        {
            if (condition == null) throw new ArgumentNullException(nameof(condition));
            if (leftAlias == null)
                leftAlias = MetadataProvider.AliasFor<TLeft>();
            if (joinAlias == null)
                joinAlias = MetadataProvider.AliasFor<TJoin>();

            return FullJoin(GetJoinFilter(condition.Body as BinaryExpression, leftAlias, joinAlias), joinAlias);
        }
Exemplo n.º 3
0
 public SqlSelect<T> GroupBy<TEntity>(params Expression<Func<TEntity, object>>[] fields)
 {
     if (fields == null) throw new ArgumentNullException(nameof(fields));
     return GroupBy(CreateSqlFields(MetadataProvider.AliasFor<TEntity>(), fields));
 }