Is there a way to cast an xml to a string in a Linq query. Something like this, but in LINQ:
select TOP(10) * from PackageSessionNodes
where CAST(Interactions as nvarchar(max)) like '%asset id%'
order by PackageSessionNodeId desc
This doesn't work:
var packageSessionNodes = from psn in db.PackageSessionNodes
where psn.Interactions.Contains("asset")
select psn;
Interactions is a XML Column in SQL2008 Server.