Skip to content

This control construct may only be used if the computation expression builder defines a 'For' method #170

@jamessdixon

Description

@jamessdixon

I am attempting to use the Sql Provider against the Adventure Works database. I can connect and the types are getting defined correctly. When I attempt to create this computational expression

r "../packages/SQLProvider.0.0.9-alpha/lib/net40/FSharp.Data.SQLProvider.dll"

open FSharp.Data.Sql

type AdventureWorks = SqlDataProvider
let context = AdventureWorks.GetDataContext()

let salesOrderQuery = query { for soh in context.[Sales].[SalesOrderHeader] do
select soh} |> Seq.toArray

I get this exception
This control construct may only be used if the computation expression builder defines a 'For' method

Can you give me a suggestion on how to fix? Thanks

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions