1-888-365-2779
+1-888-365-2779
Try Now
More in this section

Forums / Developing with Sitefinity / Docs in a Library through Fluent

Docs in a Library through Fluent

2 posts, 0 answered
  1. Steve
    Steve avatar
    3037 posts
    Registered:
    03 Dec 2008
    06 Dec 2011
    Link to this post
    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

  2. Tim
    Tim avatar
    258 posts
    Registered:
    22 Jun 2011
    06 Dec 2011
    Link to this post
    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!
2 posts, 0 answered