More in this section
Forums / Bugs & Issues / Finding Documents using Fluent API

Finding Documents using Fluent API

The forums are in read-only mode. In case that you want to directly contact the Progress Sitefinity team use the support center. In our Google Plus group you can find more than one thousand Sitefinity developers discussing different topics. For the Stack Overflow threads don’t forget to use the “Sitefinity” tag.
6 posts, 0 answered
  1. Jmr
    Jmr avatar
    53 posts
    Registered:
    21 Jan 2011
    03 Feb 2011
    Link to this post
    Hi
    inside where is it possible to give another IQuerable<Document> value? code below
    App.WorkWith().Documents() .Where(  ) 

    or  equal "IN" operator is there?

    Thanks
  2. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    12 Sep 2017
    03 Feb 2011
    Link to this post
    Hi Jmr,

    The logical operators that you can use are

    • AND
    • OR
    • =
    • NotEqual
    • LessThan
    • LessThanOrEqual
    • GreaterThan
    • GreaterThanOrEqual

    Greetings,
    Ivan Dimitrov
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  3. Jmr
    Jmr avatar
    53 posts
    Registered:
    21 Jan 2011
    04 Feb 2011
    Link to this post
    Yes i agree.but i want to use those  with DynamicColumn i.e GetValue("ColumnName").Equals there but how do i apply  logical operators.
  4. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    12 Sep 2017
    04 Feb 2011
    Link to this post
    Hello Jmr,

    Here is a sample

    var items = App.WorkWith().NewsItems()
                  .Where(ni => ((IList<Guid>)ni.GetValue("SomeField")).Contains(itemID))
                  .Get();

    Regards,
    Ivan Dimitrov
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  5. Jmr
    Jmr avatar
    53 posts
    Registered:
    21 Jan 2011
    04 Feb 2011
    Link to this post
    Thanks for quick reply

    Here GreaterThanOrEqual logical operators not used then "itemID" is Guid but i want to pass string value/Date Time value

    please clarify my doubt.
    thanking you




  6. Jmr
    Jmr avatar
    53 posts
    Registered:
    21 Jan 2011
    11 Feb 2011
    Link to this post
    var IdocList = fluent
                                               .Documents()
                                               .Where(dc => dc.Parent.Title == "PSG1"
                                                         && dc.Status == ContentLifecycleStatus.Live
                                                         && dc.GetValue("PSG1EmailID").Equals(UserEmailID))
                                               .Get(); // It have  "PSGI_ID"



                    var LA = fluent
                                                .Documents()
                                                .Where(dc => dc.Parent.Title == "JoinPlayGroup"
                                                          && dc.Status == ContentLifecycleStatus.Live 
                                                      //    && dc.GetValue("ID").Equals
    >> Here i want to get IdocList PSGI_ID and compare ID value and get n number of vlaue 
                                                      )
                                                .Get().OrderByDescending(LA => LA.DateCreated);
6 posts, 0 answered