Skip to content

Instantly share code, notes, and snippets.

@imetallica
Created June 26, 2019 22:17
Show Gist options
  • Save imetallica/0dff42841a7273c61fd7149ea0e42e8d to your computer and use it in GitHub Desktop.
Save imetallica/0dff42841a7273c61fd7149ea0e42e8d to your computer and use it in GitHub Desktop.
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>netcoreapp2.2</TargetFramework>
</PropertyGroup>
<ItemGroup>
<Compile Include="Program.fs" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Oracle.ManagedDataAccess.Core" Version="2.19.3" />
<PackageReference Include="SQLProvider" Version="1.1.65" />
<PackageReference Include="System.DirectoryServices.Protocols" Version="4.5.0" />
</ItemGroup>
</Project>
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 16
VisualStudioVersion = 16.0.29020.237
MinimumVisualStudioVersion = 10.0.40219.1
Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "EventLogger", "EventLogger\EventLogger.fsproj", "{9192578A-E45A-44FB-BD8F-FFC50D008D5B}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{9192578A-E45A-44FB-BD8F-FFC50D008D5B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{9192578A-E45A-44FB-BD8F-FFC50D008D5B}.Debug|Any CPU.Build.0 = Debug|Any CPU
{9192578A-E45A-44FB-BD8F-FFC50D008D5B}.Release|Any CPU.ActiveCfg = Release|Any CPU
{9192578A-E45A-44FB-BD8F-FFC50D008D5B}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {DE74245A-984C-419C-8B80-823FDE6C255F}
EndGlobalSection
EndGlobal
// Learn more about F# at http://fsharp.org
namespace EventLogger
open FSharp.Data.Sql
//"Data Source=ORCLCDB;User Id=sys;Password=Oradoc_db1;DBA Privilege=SYSDBA;"
type Sql = SqlDataProvider<
Common.DatabaseProviderTypes.ORACLE,
"Data Source=(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=localhost)(PORT=1521))
(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=ORCLPDB1.localdomain)));User Id=sys;Password=Oradoc_db1;DBA Privilege=SYSDBA;",
UseOptionTypes=true>
module Program =
[<EntryPoint>]
let main argv =
let ctx = Sql.GetDataContext()
ctx.Sys. // <- The Intellisense raises an Exception here.
printfn "Hello World from F#!"
0 // return an integer exit code
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment