Allow for multiple connect strings
This commit is contained in:
parent
5241e3a28a
commit
b086f76b63
@ -54,15 +54,21 @@ namespace VEPROMS.CSLA.Library
|
|||||||
if (_LoggingInfo)
|
if (_LoggingInfo)
|
||||||
Console.WriteLine("{0} MB {1}", _CurrentProcess.WorkingSet64 / 1000000, string.Format(s, hashCode));
|
Console.WriteLine("{0} MB {1}", _CurrentProcess.WorkingSet64 / 1000000, string.Format(s, hashCode));
|
||||||
}
|
}
|
||||||
|
private static string _ConnectionName = "VEPROMS";
|
||||||
|
public static string ConnectionName
|
||||||
|
{
|
||||||
|
get { return Database._ConnectionName; }
|
||||||
|
set { Database._ConnectionName = value; }
|
||||||
|
}
|
||||||
public static string VEPROMS_Connection
|
public static string VEPROMS_Connection
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
DateTime.Today.ToLongDateString();
|
DateTime.Today.ToLongDateString();
|
||||||
ConnectionStringSettings cs = ConfigurationManager.ConnectionStrings["VEPROMS"];
|
ConnectionStringSettings cs = ConfigurationManager.ConnectionStrings[ConnectionName];
|
||||||
if (cs == null)
|
if (cs == null)
|
||||||
{
|
{
|
||||||
throw new ApplicationException("Database.cs Could not find connection VEPROMS");
|
throw new ApplicationException("Database.cs Could not find connection " + ConnectionName);
|
||||||
}
|
}
|
||||||
return cs.ConnectionString;
|
return cs.ConnectionString;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user