Skip to content

Instantly share code, notes, and snippets.

@SimonDoy
Created May 24, 2016 20:20
Show Gist options
  • Save SimonDoy/74c4d52bebbe44140a096a6cb44938aa to your computer and use it in GitHub Desktop.
Save SimonDoy/74c4d52bebbe44140a096a6cb44938aa to your computer and use it in GitHub Desktop.
The initial database configuration file
using System.Collections.Specialized;
using System.Configuration;
using System.Linq;
namespace ITSP365.InvoiceFormApp.Api.DataAccess
{
internal class DatabaseConfig
{
internal string DatabaseEndPoint {
get
{
var value = ConfigurationManager.AppSettings["documentDb:EndPoint"];
return value;
}
}
internal string PrimaryKey
{
get
{
var value = ConfigurationManager.AppSettings["documentDb:PrimaryKey"];
return value;
}
}
internal string SecondaryKey
{
get
{
var value = ConfigurationManager.AppSettings["documentDb:SecondaryKey"];
return value;
}
}
internal string DatabaseName
{
get
{
var value = ConfigurationManager.AppSettings["documentDb:DatabaseName"];
return value;
}
}
internal string DocumentCollectionName
{
get
{
var value = ConfigurationManager.AppSettings["documentDb:DocumentCollectionName"];
return value;
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment