This question is locked. New answers and comments are not allowed.
Hi,
I have the following statement using Telerik OpenAccess:
var pageContent = (from pageObj in cmsdata.Objects_latests
from stackVer in cmsdata.Content_stack_versions
from contentVer in cmsdata.Content_versions
where pageObj.Page_no == _pageno
&& pageObj.Stack_id == stackVer.Stack_id
&& stackVer.Version_no == stackVer.Content_stack.Latest_version
&& contentVer.Content_no == stackVer.Content_no
orderby contentVer.Created descending
select contentVer).ToList();
The error I get is:
Failure: Identifier 'Version_no' is not a parameter or variable or field of 'CMSEditor.DataAccess.Objects_latest'. If 'Version_no' is a property please add the FieldAlias or Storage attribute to it or declare it as a field's alias.
I don't understand - I am not attempting to access the "Version_no" attribute of "Objects_latest". I am attempting to access it on the Content_stack_versions class, where it does exist.
After rearranging the code in various ways, it appears that no matter what class I attempt to access properties of, it errors as if it is attempting to access it on the object in the first from statement.
I feel like I am missing something fundamental, is anyone able to assist?
I have the following statement using Telerik OpenAccess:
var pageContent = (from pageObj in cmsdata.Objects_latests
from stackVer in cmsdata.Content_stack_versions
from contentVer in cmsdata.Content_versions
where pageObj.Page_no == _pageno
&& pageObj.Stack_id == stackVer.Stack_id
&& stackVer.Version_no == stackVer.Content_stack.Latest_version
&& contentVer.Content_no == stackVer.Content_no
orderby contentVer.Created descending
select contentVer).ToList();
The error I get is:
Failure: Identifier 'Version_no' is not a parameter or variable or field of 'CMSEditor.DataAccess.Objects_latest'. If 'Version_no' is a property please add the FieldAlias or Storage attribute to it or declare it as a field's alias.
I don't understand - I am not attempting to access the "Version_no" attribute of "Objects_latest". I am attempting to access it on the Content_stack_versions class, where it does exist.
After rearranging the code in various ways, it appears that no matter what class I attempt to access properties of, it errors as if it is attempting to access it on the object in the first from statement.
I feel like I am missing something fundamental, is anyone able to assist?