Skip to content

Instantly share code, notes, and snippets.

@nojaf
Created May 5, 2017 14:01
Show Gist options
  • Save nojaf/ecf004adba27790a84a3c1f76c1b6ab1 to your computer and use it in GitHub Desktop.
Save nojaf/ecf004adba27790a84a3c1f76c1b6ab1 to your computer and use it in GitHub Desktop.
Multiple joins with F# SqlProvider
let getXsd id =
query {
for messageItem in ctx.ProtoType.MessageType do
for originalMessage in messageItem.``ProtoType.OriginalMessage by Id`` do
for messageType in originalMessage.``ProtoType.MessageType by Id`` do
where (messageItem.Id = id)
select (messageType.Xsd)
} |> Seq.head
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment