2013年5月21日 星期二

Query NuGet information by LINQPad

Step 1, In Chrome browser, open following link to LINQPad site

http://prod.roozz.com/apps/61/LINQPad.htm

 

Step 2, Add a connection to NuGet official source, select WCF Data Services 5.1 (OData 3) as driver, hit Next button

image

 

Step 3, Input NuGet URI, https://nuget.org/api/V2/, click Test button

image

 

Step 4, A message, Connection Successful, will popup if connection is ok

image

 

Step 5, Finally, the connection of NuGet official stie is created, and a Packages is ready for query.

image

 

Step 6, Choose the connection to NuGet

Step 7, Type LINQ expression (sample code in below)

Step 8, Click to Run

Step 9, See return results

image

Sample LINQ Expression:

Packages.OrderByDescending(x => x.LastUpdated)
.Select(x =>
new
{
Id = x.Id,
Tags = x.Tags,
Title = x.Title,
Desc = x.Description,
ProjectUrl = x.ProjectUrl,
GalleryDetailsUrl = x.GalleryDetailsUrl,
Version = x.Version,
LastUpdated = x.LastUpdated
}
)

 


Step 10, Switch to Request Log, the url of query will show. We can copy the link and paste it in browser to see as well


image


 


Step 11, open in Chrome or IE browsers


Chrome


image


IE


image

沒有留言:

張貼留言