我如何将int型转换为string型?以下操作均无效:
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
编辑
我遇到的错误是:
LINQ to Entities 不认识 'System.String ToString()' 方法,并且这个方法不能被转换为存储表达式