FSharp.QueryProvider
Modular Linq provider library for .Net. Use it to easily add a Linq provider to your orm.
PM> Install-Package FSharp.QueryProvider
Example
Example for doing a like query against a simple person type.
1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: 21: 22: 23: 24: 25: 26: 27: 28: 29: 30: 31: 32: 33: 34: 35: 36: 37: 38: 39: 40: 41: 42: 43: 44: 45: 46: 47: |
|
Some more info
Samples & documentation
The library comes with comprehensible documentation.
It can include tutorials automatically generated from *.fsx files in the content folder.
The API reference is automatically generated from Markdown comments in the library implementation.
Tutorial contains a further explanation of this sample library.
API Reference contains automatically generated documentation for all types, modules and functions in the library. This includes additional brief samples on using most of the functions.
Contributing and copyright
The project is hosted on GitHub where you can report issues, fork the project and submit pull requests. If you're adding a new public API, please also consider adding samples that can be turned into a documentation. You might also want to read the library design notes to understand how it works.
The library is available under Public Domain license, which allows modification and redistribution for both commercial and non-commercial purposes. For more information see the License file in the GitHub repository.
namespace FSharp
--------------------
namespace Microsoft.FSharp
from FSharp.QueryProvider
from FSharp.QueryProvider
Full name: Index.connectionString
Full name: Index.queryProvider
type DBQueryProvider<'T (requires 'T :> IDbConnection)> =
inherit QueryProvider
new : getConnection:(unit -> 'T) * translate:('T -> Expression -> IDbCommand * ConstructionInfo) * onExecutingCommand:(IDbCommand -> IDbCommand * obj) option * onExecutedCommand:(IDbCommand * obj -> unit) option -> DBQueryProvider<'T>
override Execute : expression:Expression -> obj
Full name: FSharp.QueryProvider.Queryable.DBQueryProvider<_>
--------------------
new : getConnection:(unit -> 'T) * translate:('T -> System.Linq.Expressions.Expression -> IDbCommand * FSharp.QueryProvider.DataReader.ConstructionInfo) * onExecutingCommand:(IDbCommand -> IDbCommand * obj) option * onExecutedCommand:(IDbCommand * obj -> unit) option -> DBQueryProvider<'T>
type SqlConnection =
inherit DbConnection
new : unit -> SqlConnection + 1 overload
member BeginTransaction : unit -> SqlTransaction + 3 overloads
member ChangeDatabase : database:string -> unit
member Close : unit -> unit
member ConnectionString : string with get, set
member ConnectionTimeout : int
member CreateCommand : unit -> SqlCommand
member DataSource : string
member Database : string
member EnlistDistributedTransaction : transaction:ITransaction -> unit
...
Full name: System.Data.SqlClient.SqlConnection
--------------------
SqlClient.SqlConnection() : unit
SqlClient.SqlConnection(connectionString: string) : unit
Full name: FSharp.QueryProvider.QueryTranslator.translateToCommand
Full name: FSharp.QueryProvider.QueryTranslator.QueryDialect
Full name: Microsoft.FSharp.Core.Operators.failwith
member Cancel : unit -> unit
member CommandText : string with get, set
member CommandTimeout : int with get, set
member CommandType : CommandType with get, set
member Connection : IDbConnection with get, set
member CreateParameter : unit -> IDbDataParameter
member ExecuteNonQuery : unit -> int
member ExecuteReader : unit -> IDataReader + 1 overload
member ExecuteScalar : unit -> obj
member Parameters : IDataParameterCollection
...
Full name: System.Data.IDbCommand
| Salesman = 0
| Manager = 1
Full name: Index.JobKind
{PersonId: int;
PersonName: string;
JobKind: JobKind;
VersionNo: int;}
Full name: Index.Person
val int : value:'T -> int (requires member op_Explicit)
Full name: Microsoft.FSharp.Core.Operators.int
--------------------
type int = int32
Full name: Microsoft.FSharp.Core.int
--------------------
type int<'Measure> = int
Full name: Microsoft.FSharp.Core.int<_>
val string : value:'T -> string
Full name: Microsoft.FSharp.Core.Operators.string
--------------------
type string = System.String
Full name: Microsoft.FSharp.Core.string
Person.JobKind: JobKind
--------------------
type JobKind =
| Salesman = 0
| Manager = 1
Full name: Index.JobKind
Full name: Index.does
Full name: Microsoft.FSharp.Core.ExtraTopLevelOperators.query
Full name: FSharp.QueryProvider.Queryable.makeQuery
Calls Linq.QueryBuilder.Where
Calls Linq.QueryBuilder.Select
Full name: Microsoft.FSharp.Core.ExtraTopLevelOperators.printfn
from Microsoft.FSharp.Collections
Full name: Microsoft.FSharp.Collections.Seq.toList