I'm looking for a help with this code:
var manager = ContentManager.GetManager();
var item = manager.GetContent().Where(t => (string)t.GetValue("PRODUCT KEY") == key).FirstOrDefault();
I took it from here: http://www.sitefinity.com/devnet/forums/sitefinity-4-x/general-discussions/issue-using-indexof-function-in-fluent-api-query.aspx
It seems to me that when there's a space in argument ("PRODUCT KEY") it doesn't work (err: Unexpected token KEY). I can't rename it now, is there any workaround? Square brackets don't work either.
unexpected token: [\"KEY\",<42>,line=1,col=143]\r\nOriginal Query: DEFINE EXTENT extnt FOR Telerik.Sitefinity.GenericContent.Model.ContentItem; SELECT * FROM extnt AS t1 WHERE t1.appName = $1 AND t1.PRODUCT KEY = $2"
Thanks in advance!