This project is read-only.
TypeProvider query COUNT case

Category:
TypeProviders.SqlDataConnection
Description: type provider sample: COUNT. Use the CreateFSharpSampleDatabase.sql to setup your database tables.
Code:
type T0 = Microsoft.FSharp.Data.TypeProviders.SqlDataConnection< "Data Source=localhost;Initial Catalog=FSharpSample;User ID=sa;Password=FSharpSample1234" >

let TypeProvider8() =
let db = T0.GetDataContext();
let q = query {
for n in db.Student do
count
}
printfn "count is %d" q
Assert.AreEqual(q, 9)

Execution Result:
count is 9
both elements are equal

Last edited Mar 1, 2012 at 8:01 PM by ttliu2000, version 3

Comments

No comments yet.