0
.fsx 스크립트에서 실행할 코드를 얻을 수있었습니다. 나는 내가 끌어 당기는 궤도 데이터 위에 루프를 보지 못했다. 그래서 나는 그것을 .fs 파일에 넣고 컴파일한다고 생각했다. 나는 2 가지 문제를 다루고있다. F # IDE는 type 키워드와 let query = let에 밑줄을 긋습니다. 여기 내 oode가 있습니다 (아래) 어디에서 구문을 벗어나나요?유형 제공자 문제 - 기본 EntryPoint - 구문
open System
open System.Data
open System.Data.Linq
open Microsoft.FSharp.Data.TypeProviders
open Microsoft.FSharp.Linq
[<EntryPoint>]
let main argv =
type dbSchema = SqlDataConnection<"Data Source=SQLDEV;Initial Catalog=CDDB;Integrated Security=SSPI;">
let db = dbSchema.GetDataContext()
// Enable the logging of database activity to the console.
db.DataContext.Log <- System.Console.Out
let query1 =
query {
for row in db.SoundRecording do
select row
take 50
}
query1 |> Seq.iter (fun row -> printfn "%s - %s" row.DisplayArtist row.DisplayTitle)
0 // return an integer exit code