Hi, I'm new to LINQ expressions and trying to get the following to work:
public IQueryable<Models.Powerups.Powerup> GetPowerups(Guid userid)
{
return from p in dc.Powerups
where p.UserId == userid
select (Models.Powerups.Powerup) new DataContractSerializer(Type.GetType(p.Type, true)).ReadObject(new XmlTextReader(new StringReader(p.Data)));
}
It obviously doesn't work since LINQ is trying to translate the entire expression to SQL.
Do you know a way to do this?