I am having problem with getting this error when using GetResult():
Error setting value to 'Category' on 'CUSTOMER.Web.Models.Pages.PAGETYPENAME'
It works with GetContentResult.
Anyone know why this happens?
You should always use GetContentResult when fetching EPiServer-content. From the documentation:
In fact, de-serializing PageData objects from the index will not even work out-of-the-box. Instead, by only retrieving a reference to matching objects and them fetching them from for instance EPiServer DataFactory, we can be confident that they hold the very latest data from the database and we will also be able to update or delete them should we want to. The integration contains two extension methods that handles this process for us, GetContentResult and GetFilesResult.
Is there a reason why you can't use GetContentResult?
Edit: Corrected doc. url
Per, I know that, I went from a custom object to having it as a content object so the old code was using getresult and that was when I saw the message. I changed to use ContentResult and all works fine, but I still wan't to know why I get this error and now I know :) Thanks!
Oh, I see. Great! :-)