internal override SqlExpression VisitFunctionCall(SqlFunctionCall fc) { for(int i = 0, n = fc.Arguments.Count; i < n; i++) { fc.Arguments[i] = this.VisitExpression(fc.Arguments[i]); } if(fc.Arguments.Count > 0) { ProviderType oldType = fc.Arguments[0].SqlType; // if this has a real argument (not e.g. the symbol "DAY" in DATEDIFF(DAY,...)) if(oldType != null) { ProviderType newType = this.typeProvider.ReturnTypeOfFunction(fc); if(newType != null) { fc.SetSqlType(newType); } } } return fc; }