System.Data.Entity.Core.Objects.ELinq.ExpressionConverter.AlignTypes C# (CSharp) Method

AlignTypes() private method

private AlignTypes ( DbExpression cqt, Type toClrType ) : DbExpression
cqt DbExpression
toClrType Type
return DbExpression
        private DbExpression AlignTypes(DbExpression cqt, Type toClrType)
        {
            Type fromClrType = null; // not used in this code path
            var toType = GetCastTargetType(cqt.ResultType, toClrType, fromClrType, false);
            if (null != toType)
            {
                return cqt.CastTo(toType);
            }
            else
            {
                return cqt;
            }
        }