Hi,

I'm currently using NHQG for a new project I am working on.  I'm
currently having a small issue with a query.

In essence what I want is the following:

SELECT TOP 1 * FROM CMS_Pages
INNER JOIN CMS_PagesDocuments ON CMS_Pages.PageID =
CMS_PagesDocuments.PageID
INNER JOIN CMS_Documents ON CMS_Documents.DocumentID =
CMS_PagesDocuments.DocumentID
INNER JOIN CMS_DocumentTypes ON CMS_DocumentTypes.DocTypeID =
CMS_Documents.DocTypeID
WHERE CMS_Documents.RecordID = recordId
AND CMS_DocumentsTypes.TableName = tableName
AND CMS_Pages.TemplateID = CMS_Documents.SubTemplateID

So far I have the following code:

            CMS_Pages PageData =
                Repository<CMS_Pages>.FindFirst(
 
Where.CMS_Pages.PageDocs.With(JoinType.InnerJoin).CMS_Documents.CMS_DocumentTypes.TableName
==
                    tableName &&
 
Where.CMS_Pages.PageDocs.With(JoinType.InnerJoin).CMS_Documents.RecordID
==
                    recordId &&
 
Where.CMS_Pages.TemplateID.EqProperty("PageDocs.CMS_Documents.CMS_DocumentTypes.SubPageTemplateID"));

however this is failing.  The bit it doesn't like is the EqProperty
part.  Ideally I'd like to get away from using strings and using
property names instead, so I'm guessing I've built up the query
incorrectly.  Any advice would be much appreciated.


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Rhino Tools Dev" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/rhino-tools-dev?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to