fsprojects / FSharp.Configuration

The FSharp.Configuration project contains type providers for the configuration of .NET projects.
http://fsprojects.github.io/FSharp.Configuration/
Other
114 stars 63 forks source link

Required documentation for using yaml typeprovider to set up the SQLProvider in production #99

Closed tforkmann closed 8 years ago

tforkmann commented 8 years ago

Description

Required documentation for using yaml typeprovider to set up the SQLProvider in production.

Repro steps

1 Create Config.yaml file like this:

DB:
    ConnectionString: Data Source=....

2 Set up the Yaml Type Provider

type Config = YamlConfig<".\config.yaml"> 
let config = Config ()
let connectionString = config.DB.ConnectionString

3 Set up Sql Provider and use the ConnectionString

let [<Literal>] CompileTimeConnectionString = "Data Source=..."
type Sql = SqlDataProvider<ConnectionString = CompileTimeConnectionString, UseOptionTypes=true>
let db = Sql.GetDataContext connectionString

Expected behavior

The Yaml typeprovider should provide the connection string for the Sqlprovider which is then connecting to the db.

Actual behavior

The Yaml typeprovider provides the connection string for the Sqlprovider which is then connecting to the db.

Known workarounds

None known

Related information

vasily-kirichenko commented 8 years ago

I'm not sure I understand what you'd like to have here. And please, do not use the issue template, I don't find it any useful, it just adds noise.

forki commented 8 years ago

This is a reminder. Tim wants to write a tutorial on how to use yamlprovider together with SQLProvider. On May 23, 2016 9:50 AM, "Vasily Kirichenko" notifications@github.com wrote:

I'm not sure I understand what you'd like to have here. And please, do not use the issue template, I don't find it any useful, it just adds noise.

— You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub https://github.com/fsprojects/FSharp.Configuration/issues/99#issuecomment-220910187

forki commented 8 years ago

But I think it should go to SQLProvider On May 23, 2016 9:52 AM, "Steffen Forkmann" sforkmann@gmail.com wrote:

This is a reminder. Tim wants to write a tutorial on how to use yamlprovider together with SQLProvider. On May 23, 2016 9:50 AM, "Vasily Kirichenko" notifications@github.com wrote:

I'm not sure I understand what you'd like to have here. And please, do not use the issue template, I don't find it any useful, it just adds noise.

— You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub https://github.com/fsprojects/FSharp.Configuration/issues/99#issuecomment-220910187

tforkmann commented 8 years ago

ok sorry. closing it now.