1
當使用F#LINQ to SQL查詢表達式時,有沒有辦法在C#中進行動態排序 - ala dyanmic LINQ?特別是我期待做到以下幾點,如何在F#LINQ to SQL中動態排序
open System
open Microsoft.FSharp.Data.TypeProviders
open System.Data.Linq.SqlClient
open System.Linq
open Microsoft.FSharp.Linq
type schema = SqlDataConnection<"Data Source=SERVER\INSTANCE;InitialCatalog=MyDatabase;Integrated Security=SSPI;">
let db = schema.GetDataContext()
query {
for student in db.Student do
sortBy "Name" //provide column name as string rather than expr
select student
}