Skip to content

Instantly share code, notes, and snippets.

@davidgrenier
Created January 2, 2014 14:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save davidgrenier/8220192 to your computer and use it in GitHub Desktop.
Save davidgrenier/8220192 to your computer and use it in GitHub Desktop.
Pattern matching query
query {
for order in db.Orders do
let status =
match order.Status with
| 0 | 1 -> "Cancelled/Returned"
| _ -> "Valid"
where (status = "Valid")
select order
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment