|
|
@ -56,10 +56,7 @@ namespace NzbDrone.Core
|
|
|
|
var appDataPath = environmentProvider.GetAppDataPath();
|
|
|
|
var appDataPath = environmentProvider.GetAppDataPath();
|
|
|
|
if (!Directory.Exists(appDataPath)) Directory.CreateDirectory(appDataPath);
|
|
|
|
if (!Directory.Exists(appDataPath)) Directory.CreateDirectory(appDataPath);
|
|
|
|
|
|
|
|
|
|
|
|
container.Register(c =>
|
|
|
|
container.Register(c => c.Resolve<IDbFactory>().Create(environmentProvider.GetNzbDroneDatabase())).As<IDatabase>().SingleInstance();
|
|
|
|
{
|
|
|
|
|
|
|
|
return c.Resolve<IDbFactory>().Create(environmentProvider.GetNzbDroneDatabase());
|
|
|
|
|
|
|
|
}).As<IDbConnection>().SingleInstance();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
container.RegisterGeneric(typeof(BasicRepository<>)).As(typeof(IBasicRepository<>));
|
|
|
|
container.RegisterGeneric(typeof(BasicRepository<>)).As(typeof(IBasicRepository<>));
|
|
|
|
}
|
|
|
|
}
|
|
|
|