fsharp.sqlclient

Why do I get a missing method exception runtime when creating a SqlClient type?

谁说胖子不能爱 提交于 2020-01-03 17:04:34
问题 I have the following code: open FSharp.Data [<Literal>] let connectionString = @"Data Source=(local)\SQLExpress;Integrated Security=SSPI;Database=SfagStage" type InsertEnhet = SqlCommandProvider<"Sql\InsertEnhet.sql", connectionString> let insertEnhet (enhet:Enhet) = let cmd = new InsertEnhet() // <<--- This generates an error runtime cmd.Execute(enhet.Navn, enhet.Enhetsnummer, enhet.LEIKode, enhet.Kommune, DateTime.Now) The row where I create the command is what causing the missing method I