Linq int zu string
Wie wirke ich und int in eine Zeichenfolge? Keine der folgenden Möglichkeiten funktioniert:
from s in ctx.Services
where s.Code.ToString().StartsWith("1")
select s
from s in ctx.Services
where Convert.ToString(s.Code).StartsWith("1")
select s
from s in ctx.Services
where ((string)s.Code).ToString().StartsWith("1")
select s
BEARBEITEN
Der Fehler, den ich erhalte, ist:
LINQ to Entities does not recognize the method 'System.String ToString()' method, and this method cannot be translated into a store expression