I am wondering if anyone can help me, the issue I have is that I cant return the results in a concatenate string using Linq. The query works fine the issue is how to concatenate the results as string, string so forth as there can be many hash tags
var contacttag = (from HE in HashTagEntities
join t in Accounts on HE.Parentid equals t.id
where HE.ParentId == 3 &&
t.AccountName == "Test"
from tag in HashTags
where HE.HashTagid == tag.HOCODE
select new { tag.HashTagText }).Select(x => x.HashTagText.ToString());
If anyone could help I would be grateful I am getting a error below:
"LINQ to Entities does not recognize the method 'System.String ToString()' method, and this method cannot be translated into a store expression."
(from HE in ... tag.HashTagText })toIEnumerable<T>(whereTis the type ofHashTagText), it should work. That ought to avoid going through the Entities extension methods. If that doesn't work, you might have to useToList()before theSelect()to get out of the Entities handling of the query.