mirror of
https://github.com/lidarr/Lidarr
synced 2024-12-26 17:47:08 +00:00
fixed container registration.
This commit is contained in:
parent
63ba1ed026
commit
e0b881fe4b
1 changed files with 1 additions and 4 deletions
|
@ -56,10 +56,7 @@ private static void InitDatabase(this ContainerBuilder container)
|
||||||
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<>));
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue