Example #1
0
        /// <summary>   Joins. </summary>
        ///
        /// <remarks>   Asim Naeem, 7/20/2017. </remarks>
        ///
        /// <typeparam name="J">    . </typeparam>
        /// <param name="left">     . </param>
        /// <param name="right">    . </param>
        ///
        /// <returns>   A QueryBuilder&lt;T&gt; </returns>


        public QueryBuilder <T> Join <J>(Expression <Func <T, object> > left, Expression <Func <J, object> > right)
        {
            _join.Add(new KeyValuePair <Type, Tuple <string, string> >(typeof(J), new Tuple <string, string>(HelperUtility.ConvertExpressionToString(left), HelperUtility.ConvertExpressionToString(right))));
            return(this);
        }
Example #2
0
        /// <summary>   Gets the where. </summary>
        ///
        /// <remarks>   Asim Naeem, 7/20/2017. </remarks>
        ///
        /// <returns>   A string. </returns>


        public string Where()
        {
            return(_where == null ? string.Empty :  string.Format("WHERE {0}", HelperUtility.ConvertExpressionToString(_where.Body)));
        }