为什么不编译
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()))
有错误错误:此值不是函数且无法应用
答案 0 :(得分:-1)
我知道了,它丢失了,在密钥和计数之间