Last active
February 3, 2020 22:51
-
-
Save altaurog/b2ee236eda84944a6a9e113304e72202 to your computer and use it in GitHub Desktop.
Error using SQLProvider
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: '2' | |
services: | |
sqlprovider-test: | |
build: ./ | |
command: bash -c "while ! nc -z mssql 1433; do echo waiting; sleep 1; done; sleep 10; dotnet build --verbosity detailed" | |
container_name: sqlprovider-test | |
depends_on: | |
- mssql | |
mssql: | |
image: mcr.microsoft.com/mssql/server:2017-latest | |
environment: | |
- ACCEPT_EULA=Y | |
- SA_PASSWORD=NeOk2-sleif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM mcr.microsoft.com/dotnet/core/sdk:3.1 | |
RUN apt-get update && apt-get install -y netcat | |
COPY Test.fsproj Program.fs /Test/ | |
WORKDIR /Test | |
RUN dotnet restore # --verbosity detailed |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
open FSharp.Data.Sql | |
type sql = | |
SqlDataProvider< | |
DatabaseVendor = Common.DatabaseProviderTypes.MSSQLSERVER, | |
ConnectionString = "Server=mssql;User Id=sa;Password=NeOk2-sleif;Database=master", | |
UseOptionTypes = true, | |
Owner = "Master" | |
> | |
let ctx = sql.GetDataContext() | |
[<EntryPoint>] | |
let main argv = 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<Project Sdk="Microsoft.NET.Sdk"> | |
<PropertyGroup> | |
<OutputType>Exe</OutputType> | |
<TargetFramework>netstandard2.0</TargetFramework> | |
</PropertyGroup> | |
<ItemGroup> | |
<Compile Include="Program.fs" /> | |
</ItemGroup> | |
<ItemGroup> | |
</ItemGroup> | |
<ItemGroup> | |
<PackageReference Include="SQLProvider" Version="1.1.59" /> | |
</ItemGroup> | |
</Project> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment