Which method of canonical EntityFunctions for .ToString()
问题 I am using EF and if I use expression like: JobLinkId = jobItem.joblinkid.ToString() it throws error because it is C# function. Which method of EF canonical functions should I use for this? 回答1: I'm guessing that you're trying to use ToString in Linq to Entities query. If so then its impossible to use it there. The only walkaround i know is to use ToList on query and then use Linq to Objects to get result with ToString . 回答2: To something like this: instead of JobItem.joblinkid.ToString() use