Created
October 13, 2011 09:14
-
-
Save robashton/1283813 to your computer and use it in GitHub Desktop.
An aeroplane induced science project
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
new QueryBuilder() | |
.Where(blog -> blog.Author == "Rob") | |
.Select(blog -> { | |
Title: blog.Title, | |
Content: blog.Content | |
}) | |
.GetQuery() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var sqlQuery = new QueryBuilder() | |
.Where(function (blog) { | |
return blog.Author == "Rob"; | |
}) | |
.Select(function (blog) { | |
return { | |
Title: blog.Title, | |
Content: blog.Content | |
}) | |
.GetQuery(); | |
equals(query, "SELECT blog.Title, blog.Content FROM blog WHERE blog.Title = 'Rob'", "Output SQL query is as expected"); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment