linq2db.FSharp
6.5.0
Prefix Reserved
dotnet add package linq2db.FSharp --version 6.5.0
NuGet\Install-Package linq2db.FSharp -Version 6.5.0
<PackageReference Include="linq2db.FSharp" Version="6.5.0" />
<PackageVersion Include="linq2db.FSharp" Version="6.5.0" />
<PackageReference Include="linq2db.FSharp" />
paket add linq2db.FSharp --version 6.5.0
#r "nuget: linq2db.FSharp, 6.5.0"
#:package linq2db.FSharp@6.5.0
#addin nuget:?package=linq2db.FSharp&version=6.5.0
#tool nuget:?package=linq2db.FSharp&version=6.5.0
LINQ to DB F# Services
LINQ to DB F# Services provides support for F#-specific language features in Linq To DB.
Supported features:
F# record types support in mappings and projections
Automatic mapping of F#
'T optionand'T voptioncolumns: the "some" case is stored as the value and the "none" case asNULL, with no manualMappingSchemaconfiguration. Value-typed options (e.g.int option) correctly store the "none" case asNULLrather than the default value. Only options over a scalar element type are auto-mapped. The column's DB type (including facets such as decimal precision/scale and string length) is resolved from the element type against the connection's provider mapping schema, so it matches the non-option column of the same element type.Query translation of F#
option/voptionmember access:.IsSome/.IsNonetranslate toIS NOT NULL/IS NULLand.Valueto the underlying column, so option members can be used directly inwhereandselect. Thevoptioncase testers.IsValueSome/.IsValueNonetranslate as well. Because.Valuebecomes the column itself, selecting it from a row whose column isNULLreads back the element's default instead of raising the wayOption.get Nonedoes - the same asNullable<T>.Value.Automatic mapping of single-case scalar discriminated unions (e.g.
type UserId = UserId of int): the column stores the wrapped value and reads back as the reconstructed union, and equality against a union literal (x.Key = UserId 10) translates to a comparison on the wrapped value.UserId optionis supported too, storing the "none" case asNULL.A non-struct single-case union is a reference type, so reading a
NULLinto one yieldsnull- for example on the unmatched row of aLEFT JOIN. A[<Struct>]single-case union is a value type and so cannot holdnull: reading aNULLinto one yields the union wrapping the element's default, so for[<Struct>] type Age = Age of intthat isAge 0, the same way a plainintmember readsNULLas0. Useoptionwhen the column is nullable.
More features planned for future releases.
How to use
using var db = new DataConnection(
new DataOptions()
.UseSqlServer(@"Server=.\;Database=Northwind;Trusted_Connection=True;")
// enables F# Services for connection
.UseFSharp());
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 is compatible. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
| .NET Core | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
| .NET Standard | netstandard2.0 is compatible. netstandard2.1 was computed. |
| .NET Framework | net461 was computed. net462 is compatible. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
| MonoAndroid | monoandroid was computed. |
| MonoMac | monomac was computed. |
| MonoTouch | monotouch was computed. |
| Tizen | tizen40 was computed. tizen60 was computed. |
| Xamarin.iOS | xamarinios was computed. |
| Xamarin.Mac | xamarinmac was computed. |
| Xamarin.TVOS | xamarintvos was computed. |
| Xamarin.WatchOS | xamarinwatchos was computed. |
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 6.5.0 | 87 | 9/11/2026 |
| 6.4.0 | 233 | 8/7/2026 |
| 6.3.0 | 244 | 5/17/2026 |
| 6.2.1 | 466 | 3/17/2026 |
| 6.2.0 | 144 | 3/12/2026 |
| 6.1.0 | 453 | 12/15/2025 |
| 6.0.0 | 6,838 | 12/5/2025 |
| 6.0.0-rc.3 | 277 | 8/14/2025 |
| 6.0.0-rc.2 | 167 | 7/31/2025 |
| 6.0.0-rc.1 | 184 | 7/17/2025 |
| 6.0.0-preview.4 | 273 | 3/26/2025 |
| 6.0.0-preview.3 | 322 | 1/28/2025 |
| 6.0.0-preview.2 | 134 | 1/22/2025 |