I've seen a lot of posts here about String.Concat usage failing; EF documentation says it does support concat, but only the following three overloads:
System.String Concat(String str0, String str1)
System.String Concat(String str0, String str1, String str2)
System.String Concat(String str0, String str1, String str2, String str03)
The problem I'm having is that VB LINQ is defaulting to using the
System.String Concat(ParamArray values As String())
overload by default, so I get an error. Is there a way to force which overload I want within the EF query in VB? My query I use is the following:
from x in table
group join y ...
.
.
select New With { .Text = String.Concat(SqlFunctions.Convert(x.ID), " - ", if (y is null, "", y.Name)) }
Even using a select of:
select New With { .Text = String.Concat(SqlFunctions.Convert(x.ID), " - ", "TEST NAME") }
Fails too, because it uses the array overload, and not the argument overload. Is there a way to make it work?
String.Concat("A", "B", "C")it also fails, saying it used the paramarray version, even though the VS designer shows the version with 3 string args that's listed above...