You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

32 lines
799 B

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace NFine.Code
{
public class DBConnection
{
public static bool Encrypt { get; set; }
public DBConnection(bool encrypt)
{
Encrypt = encrypt;
}
public static string connectionString
{
get
{
string connection = System.Configuration.ConfigurationManager.ConnectionStrings["NFineDbContext"].ConnectionString;
if (Encrypt == true)
{
return DESEncrypt.Decrypt(connection);
}
else
{
return connection;
}
}
}
}
}