Nlog: Database target: SUpport connectionStringName on .NET Core

Created on 7 Aug 2020  Â·  7Comments  Â·  Source: NLog/NLog

NLog version: 4.7.3
Platform: .NET Core 3

The Database target wiki page says about connectionStringName:

Not supported on NetCore as app.config has been replaced with appsettings.json

While this is true, connection strings are stored in the ConnectionStrings dictionary:

{
  "ConnectionStrings": {
    "SomeName": "Data Source=.;Initial Catalog=SomeDB;Persist Security Info=True;Integrated Security=true;"
  }
}

Wouldn't it be possible to support this by retrieving them from the configuration?

needs info question

All 7 comments

@leonardder Does it answer your question? so the issue can be resolved/closed

Please add the requested info, so we could help you better! (This issue will be closed in 7 days)

Yes, that's certainly a solution for me. However, may be the docs about connectionStringName should point at this alternative to get a connection string by name?

Good idea. The Wiki is open for editing

Sent from my Sony Xperia

---- Leonard de Ruijter wrote ----

Yes, that's certainly a solution for me. However, may be the docs about connectionStringName should point at this alternative to get a connection string by name?

—
You are receiving this because you commented.
Reply to this email directly, view it on GitHubhttps://github.com/NLog/NLog/issues/4075#issuecomment-671742207, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ACXZ7HAZA6EAST2XA4QXOPLSADMGXANCNFSM4PXN2DMA.

Done.

Thanks!!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

JustArchi picture JustArchi  Â·  3Comments

BobSeu picture BobSeu  Â·  3Comments

smeegoan picture smeegoan  Â·  3Comments

ErcinDedeoglu picture ErcinDedeoglu  Â·  3Comments

haythamabutair picture haythamabutair  Â·  3Comments