Skip to content

Commit

Permalink
Merge pull request #320 from samhanes/netstandard-docs
Browse files Browse the repository at this point in the history
Add documentation for Net Core
  • Loading branch information
vasily-kirichenko authored Jun 11, 2019
2 parents 8580a8b + 6ad47c8 commit 37a6ae5
Show file tree
Hide file tree
Showing 17 changed files with 35 additions and 249 deletions.
1 change: 1 addition & 0 deletions SqlClient.sln
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "content", "content", "{4B60
docs\content\debugging.fsx = docs\content\debugging.fsx
docs\content\faq.fsx = docs\content\faq.fsx
docs\content\index.fsx = docs\content\index.fsx
docs\content\netcore.md = docs\content\netcore.md
docs\content\output.fsx = docs\content\output.fsx
docs\content\setup.fsx = docs\content\setup.fsx
docs\content\SqlClientComparison.md = docs\content\SqlClientComparison.md
Expand Down
2 changes: 1 addition & 1 deletion docs/content/bulk load.fsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
(*** hide ***)
#r @"..\..\bin\FSharp.Data.SqlClient.dll"
#r @"..\..\bin\net40\FSharp.Data.SqlClient.dll"
#r "System.Transactions"
open FSharp.Data
open System
Expand Down
2 changes: 1 addition & 1 deletion docs/content/configuration and Input.fsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
(*** hide ***)
#r @"..\..\bin\FSharp.Data.SqlClient.dll"
#r @"..\..\bin\net40\FSharp.Data.SqlClient.dll"
#r "Microsoft.SqlServer.Types.dll"
(**
Expand Down
2 changes: 1 addition & 1 deletion docs/content/data modification.fsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
(*** hide ***)
#r @"..\..\bin\FSharp.Data.SqlClient.dll"
#r @"..\..\bin\net40\FSharp.Data.SqlClient.dll"
#r "System.Transactions"
open FSharp.Data
open System
Expand Down
2 changes: 1 addition & 1 deletion docs/content/debugging.fsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
(*** hide ***)
#r @"..\..\bin\FSharp.Data.SqlClient.dll"
#r @"..\..\bin\net40\FSharp.Data.SqlClient.dll"
#r "System.Transactions"
open FSharp.Data
open System
Expand Down
2 changes: 1 addition & 1 deletion docs/content/faq.fsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
(*** hide ***)
#r @"..\..\bin\FSharp.Data.SqlClient.dll"
#r @"..\..\bin\net40\FSharp.Data.SqlClient.dll"
#r "System.Transactions"
open FSharp.Data

Expand Down
2 changes: 1 addition & 1 deletion docs/content/index.fsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
(*** hide ***)
#r "Microsoft.SqlServer.Types.dll"
#r @"..\..\bin\FSharp.Data.SqlClient.dll"
#r @"..\..\bin\net40\FSharp.Data.SqlClient.dll"

(**
Not your grandfather's ORM
Expand Down
19 changes: 19 additions & 0 deletions docs/content/netcore.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
Support for .NET Core
=====================

As of version 2.0.1, a `netstandard2.0`-targeted version of FSharp.Data.SqlClient is available.
This means you should be able to reference and use the type provider from a .NET Core application,
with the following caveats and exceptions:

* The type provider is split into two different assemblies, `FSharp.Data.SqlClient.dll`
(the runtime component or RTC) and `FSharp.Data.SqlClient.DesignTime.dll` (the design-time component or DTC).
* The RTC (and its dependencies) must be available at runtime; they end up in the bin folder
alongside your application's compiled assemblies. The FSharp.Data.SqlClient RTC is available for
both `net40` and `netstandard2.0` and is thus fully compatible with .NET Core 2.0 applications.
* The DTC is required to make the provided types available to your design-time tooling and to the
compiler. The FSharp.Data.SqlClient DTC *has .NET Framework-only dependencies* (`Microsoft.SqlServer.Types`
and `Microsoft.SqlServer.TransactSql.ScriptDom`). As such, either .NET Framework or Mono must be
installed in order to compile your .NET Core application. Additionally, you must import `fsc.props`
in your .fsproj/.csproj file - please see more detailed instructions [here](https://github.com/Microsoft/visualfsharp/issues/3303).
* As mentioned above, `Microsoft.SqlServer.Types` only targets .NET Framework, so you will not be able to use types such as [HierarchyId](http://technet.microsoft.com/en-us/library/bb677173.aspx) or
[spatial types](http://blogs.msdn.com/b/adonet/archive/2013/12/09/microsoft-sqlserver-types-nuget-package-spatial-on-azure.aspx) from your .NET Core app.
2 changes: 1 addition & 1 deletion docs/content/output.fsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
(*** hide ***)
#r @"..\..\bin\FSharp.Data.SqlClient.dll"
#r @"..\..\bin\net40\FSharp.Data.SqlClient.dll"
#r "Microsoft.SqlServer.Types.dll"
open FSharp.Data
[<Literal>]
Expand Down
2 changes: 1 addition & 1 deletion docs/content/setup.fsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#nowarn "211"
#r @"..\..\bin\FSharp.Data.SqlClient.dll"
#r @"..\..\bin\net40\FSharp.Data.SqlClient.dll"
#r "System.Transactions"

open FSharp.Data
Expand Down
2 changes: 1 addition & 1 deletion docs/content/transactions.fsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
(*** hide ***)
#r @"..\..\bin\FSharp.Data.SqlClient.dll"
#r @"..\..\bin\net40\FSharp.Data.SqlClient.dll"
#r "System.Transactions"
open FSharp.Data

Expand Down
4 changes: 2 additions & 2 deletions docs/content/unit-testing.fsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
(*** hide ***)
#r @"..\..\bin\FSharp.Data.SqlClient.dll"
#r @"..\..\bin\net40\FSharp.Data.SqlClient.dll"
#r @"..\..\packages\Test\xunit\lib\net20\xunit.dll"
#r "System.Transactions"
open FSharp.Data
Expand Down Expand Up @@ -87,7 +87,7 @@ module MyTests =

//unit test
let ``best sales rep in Canada``() =
let expected = Some( GetSalesChampion.Record("José", "Saraiva"))
let expected = Some( GetSalesChampion.Record("José", "Saraiva"))
assert (bestSalesRepInCanada mockRepository = expected)


Expand Down
2 changes: 1 addition & 1 deletion docs/content/whatsnew.fsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
(*** hide ***)
#r "Microsoft.SqlServer.Types.dll"
#r @"..\..\bin\FSharp.Data.SqlClient.dll"
#r @"..\..\bin\net40\FSharp.Data.SqlClient.dll"

open FSharp.Data

Expand Down
189 changes: 0 additions & 189 deletions docs/output/content/style.css

This file was deleted.

46 changes: 0 additions & 46 deletions docs/output/content/tips.js

This file was deleted.

3 changes: 2 additions & 1 deletion docs/tools/templates/template.cshtml
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,9 @@

<li class="nav-header">Documentation</li>
<li><a href="@Root/whatsnew.html">What's New</a></li>
<li><a href="@Root/netcore.html">Support for .NET Core</a></li>
<li><a href="@Root/configuration and input.html">Configuration and Input</a></li>
<li><a href="@Root/output.html">Output</a></li>
<li><a href="@Root/output.html">Output</a></li>
<li><a href="@Root/faq.html">FAQ</a></li>
<li class="divider"></li>
<li><a href="@Root/data modification.html">Data Modification</a></li>
Expand Down
2 changes: 1 addition & 1 deletion src/SqlClient.TestProjects/Lib/Script.fsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#r @"..\..\..\bin\FSharp.Data.SqlClient.dll"
#r @"..\..\..\bin\net40\FSharp.Data.SqlClient.dll"
#r @"bin\Debug\Lib.dll"
#r @"System.Configuration"
#r @"System.Transactions"
Expand Down

0 comments on commit 37a6ae5

Please sign in to comment.