Docs in a Library through Fluent

Posted by Community Admin on 04-Aug-2018 00:28

Docs in a Library through Fluent

All Replies

Posted by Community Admin on 06-Dec-2011 00:00

Why is this not valid?

var documents = App.WorkWith()
                                   .Documents()
                                   .Publihed()
                                   .Where(ci => ci.Library.Title == this.LibraryName)
                                   .Get();

Field 'Library' not found on class 'Telerik.Sitefinity.Libraries.Model.Document'.

Seems fine through intellisense

Posted by Community Admin on 06-Dec-2011 00:00

Steve,

From what I've read, this is the recommended way of accomplishing what you're trying to do:

var documents = App.WorkWith().Documents().Publihed().Where(d => d.Parent.Title.ToString() == this.LibraryName).Get();

Here's the post where I picked up the explanation.

Hope that helps!

This thread is closed