App.Config SQL Server

  • Thread starter Thread starter Priya Bange
  • Start date Start date
P

Priya Bange

Guest
Hi Experts,

Currently am reading value from App.Config something like below and its working absolutely fine for a windows service.

<appSettings>
<add key="FilePath" value="C:\File_Output\" />
</appSettings>


Now , the requirement is to read the value from SQL Server table. The service has a polling based on quartz to query the DB every 10 second to check for any new change. Could anyone suggest me best practices for assigning values to a variable which will be used as

current

var path = Path.Combine(ConfigurationManager.AppSettings["FilePath"], $"{query.Request_Target}_{datetime}{format}");

Thanks

Priya

Continue reading...
 
Back
Top