(Web/App) .Config / AppSettings.json
Example (Web/App) .Config / AppSettings.json for ECRUD.
Documentation
This example uses Oracle HR schema.
NET Standard
Configuration for the (Web/App) .Config file. Requires the PathLog and PathFile keys. The connectionString will be used in the enum.
Packages dependencies.
PM> Install-Package ECRUD
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.1" />
</startup>
<appSettings>
<add key="PathLog" value="C:\ECrudLog\Demo"/>
<add key="PathFile" value="C:\ECrudLog\Demo\Demo.txt"/>
</appSettings>
<connectionStrings>
<add name="HR" connectionString="Data Source=(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=DESKTOP-KIC6KFS.localdomain)(PORT=1521))(CONNECT_DATA=(SERVER = DEDICATED)(SERVICE_NAME = XE)));User Id=sys;Password=yourpassword"/>
</connectionStrings>
</configuration>
NET Core
Configuration for the appsettings.json file. Requires the PathLog and PathFile keys. The connectionString will be used in the enum.
Packages dependencies.
PM> Install-Package ECRUD.Core
{
"ConnectionStrings": {
"HR": "Data Source=(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=DESKTOP-KIC6KFS.localdomain)(PORT=1521))(CONNECT_DATA=(SERVER = DEDICATED)(SERVICE_NAME = XE)));User Id=sys;Password=yourpassword"
},
"ECRUDLog": {
"PathLog": "C:\\ECRUDLog\\ECRUD",
"PathFile": "C:\\ECRUDLog\\ECRUD\\ECRUD.txt"
}
}
Settings
- Need to change the Copy to Output Directory property to Copy always of the appsettings.json file