/// <summary>
        /// Returns true if the expression is a DbPropertyExpression (i.e. a class property that has been mapped
        /// to a database column) and the type is a Nullable type.
        /// </summary>
        /// <param name="expression"></param>
        /// <returns></returns>
        private static bool IsNullableExpressionOfType <T>(DbExpression expression)
            where T : DbExpression
        {
            if (expression == null)
            {
                return(false);
            }

            if (!typeof(T).IsAssignableFrom(expression.GetType()))
            {
                return(false);
            }

            return(expression.ResultType.Facets.Any(f => f.Name == "Nullable" && ((bool)f.Value)));
        }
Esempio n. 2
0
 private void Begin(DbExpression expr, Dictionary <string, object> attrs)
 {
     attrs.Add("DbExpressionKind", Enum.GetName(typeof(DbExpressionKind), expr.ExpressionKind));
     Begin(expr.GetType().Name, attrs);
     Dump(expr.ResultType, "ResultType");
 }
Esempio n. 3
0
 public override void Visit(DbExpression e)
 {
     throw EntityUtil.NotSupported(System.Data.Entity.Strings.Cqt_General_UnsupportedExpression(e.GetType().FullName));
 }
 public override void Visit(DbExpression e)
 {
     throw new NotSupportedException(Strings.Cqt_General_UnsupportedExpression(e.GetType().FullName));
 }
Esempio n. 5
0
 public override TreeNode Visit(DbExpression e)
 {
     Check.NotNull <DbExpression>(e, nameof(e));
     throw new NotSupportedException(Strings.Cqt_General_UnsupportedExpression((object)e.GetType().FullName));
 }
        public override void Visit(DbExpression e)
        {
            Check.NotNull(e, "e");

            throw new NotSupportedException(Strings.Cqt_General_UnsupportedExpression(e.GetType().FullName));
        }
 private void End(DbExpression expr)
 {
     End(expr.GetType().Name);
 }
Esempio n. 8
0
        /// <summary>
        ///     Called when an <see cref="DbExpression" /> of an otherwise unrecognized type is encountered.
        /// </summary>
        /// <param name="expression"> The expression </param>
        /// <returns> </returns>
        /// <exception cref="NotSupportedException">
        ///     Always thrown if this method is called, since it indicates that
        ///     <paramref name="expression" />
        ///     is of an unsupported type
        /// </exception>
        public override bool Visit(DbExpression expression)
        {
            Check.NotNull(expression, "expression");

            throw new NotSupportedException(Strings.Cqt_General_UnsupportedExpression(expression.GetType().FullName));
        }
 public override void Visit(DbExpression e)
 {
     throw EntityUtil.NotSupported(System.Data.Entity.Strings.Cqt_General_UnsupportedExpression(e.GetType().FullName));
 }
 private void Begin(DbExpression expr, Dictionary<string, object> attrs)
 {            
     attrs.Add("DbExpressionKind", Enum.GetName(typeof(DbExpressionKind), expr.ExpressionKind));
     Begin(expr.GetType().Name, attrs);
     Dump(expr.ResultType, "ResultType");
 }
Esempio n. 11
0
 private void WriteRawExpression(DbExpression expression)
 {
     WriteLine("RAW: " + expression.GetType().Name);
 }
Esempio n. 12
0
 private void Write(DbExpression expression)
 {
     WriteLine(string.Format("{0} ({1}) : {2}", expression.ExpressionKind, expression.GetType().Name, expression.ResultType));
 }
Esempio n. 13
0
 public override void Visit(DbExpression expression)
 {
     EntityUtils.CheckArgumentNull <DbExpression>(expression, nameof(expression));
     throw new NotSupportedException(EFProviderSettings.Instance.GetErrorMessage(-1703, "Oracle Data Provider for .NET", expression.GetType().FullName));
 }
Esempio n. 14
0
 private void End(DbExpression expr)
 {
     End(expr.GetType().Name);
 }
        /// <summary>
        /// Called when an <see cref="DbExpression"/> of an otherwise unrecognized type is encountered.
        /// </summary>
        /// <param name="expression">The expression</param>
        /// <exception cref="ArgumentNullException"><paramref name="expression"/> is null</exception>
        /// <exception cref="NotSupportedException">Always thrown if this method is called, since it indicates that <paramref name="expression"/> is of an unsupported type</exception>
        public override void Visit(DbExpression expression)
        {
            // #433613: PreSharp warning 56506: Parameter 'expression' to this public method must be validated: A null-dereference can occur here.
            EntityUtil.CheckArgumentNull(expression, "expression");

            throw EntityUtil.NotSupported(System.Data.Entity.Strings.Cqt_General_UnsupportedExpression(expression.GetType().FullName));
        }
Esempio n. 16
0
 public override bool Visit(DbExpression expression)
 {
     throw new NotSupportedException(expression.GetType().FullName);
 }
        /// <summary>
        ///     Called when an <see cref="DbExpression" /> of an otherwise unrecognized type is encountered.
        /// </summary>
        /// <param name="expression"> The expression </param>
        /// <exception cref="ArgumentNullException">
        ///     <paramref name="expression" />
        ///     is null
        /// </exception>
        /// <exception cref="NotSupportedException">
        ///     Always thrown if this method is called, since it indicates that
        ///     <paramref name="expression" />
        ///     is of an unsupported type
        /// </exception>
        public override void Visit(DbExpression expression)
        {
            Check.NotNull(expression, "expression");

            throw new NotSupportedException(Strings.Cqt_General_UnsupportedExpression(expression.GetType().FullName));
        }