2012-04-22 22:18:28 +00:00
|
|
|
|
using System.Configuration;
|
2012-02-05 06:34:36 +00:00
|
|
|
|
using System.Linq;
|
2012-02-17 22:04:22 +00:00
|
|
|
|
using Services.PetaPoco;
|
|
|
|
|
|
2012-02-05 06:34:36 +00:00
|
|
|
|
|
|
|
|
|
namespace NzbDrone.Services.Service.Datastore
|
|
|
|
|
{
|
|
|
|
|
public static class Connection
|
|
|
|
|
{
|
|
|
|
|
public static string GetConnectionString
|
|
|
|
|
{
|
|
|
|
|
get { return ConfigurationManager.ConnectionStrings["SqlExpress"].ConnectionString; }
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public static IDatabase GetPetaPocoDb()
|
|
|
|
|
{
|
|
|
|
|
var db = new Database("SqlExpress")
|
|
|
|
|
{
|
2012-03-01 05:39:15 +00:00
|
|
|
|
KeepConnectionAlive = false,
|
2012-02-05 06:34:36 +00:00
|
|
|
|
ForceDateTimesToUtc = false,
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
return db;
|
|
|
|
|
}
|
2012-03-30 01:35:35 +00:00
|
|
|
|
|
|
|
|
|
|
2012-04-22 22:18:28 +00:00
|
|
|
|
|
2012-02-05 06:34:36 +00:00
|
|
|
|
}
|
|
|
|
|
}
|