NOODB: Order By

Yesterday, I hacked the order by just to see it work.

Today, it works for real. This is a method that the RECENT REVIEWS page uses to get the reviews. (Repeater => Object Data Source => this method)

    public static Collection<MovieReview> GetRecentMovieReviews(int count)
    {
        IObjectClient client = NoodbUtility.GetNoodbClient();
        return client.Query<MovieReview>("from r in MovieReview orderby r.ReviewDate descending take " + count);
    }

As usual, kindly overlook the fact that there isn’t a select. I don’t really need it until it supports projections, which is coming soon.

noodb orderby

That’s a screenshot of the website. None of the recent movies have images. If they did, you’d see them on the left side. (There is one off screen; Roswell Season 1)

Next, it would be nice to query for a single field so that I can retrieve the FULL REVIEW through ajax. I think that’ll be my next move, but I’m not committed yet. That’d work like

from r in MovieReview where r.ReviewId=’…’ select r.ReviewText


Advertisements

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: