-2

为什么这不编译

open System
open System.Data
open System.Data.Linq
open System.Linq
open Microsoft.FSharp.Data.TypeProviders
open Microsoft.FSharp.Linq
open Microsoft.FSharp.Linq.RuntimeHelpers

type dbSchema = SqlDataConnection<"Data Source=.;Initial Catalog=MyDatabase;Integrated Security=SSPI;">
let db = dbSchema.GetDataContext()

query {
    for row in db.Table1 do
    groupBy row.Id into gr
    select( gr.Key (gr.Count()))
    }
 |> Seq.iter (fun row -> printfn "Found row: %d" row.Count)

我在行中遇到编译错误

select( gr.Key (gr.Count()))

错误错误:此值不是函数,无法应用

4

1 回答 1

-1

我明白了,它在 key 和 count 之间丢失了

于 2013-09-11T22:48:56.083 回答