1
0
mirror of https://github.com/Sonarr/Sonarr.git synced 2025-03-05 15:15:59 +02:00

fixed container registration.

This commit is contained in:
kay.one 2013-03-25 23:55:27 -07:00
parent 63ba1ed026
commit e0b881fe4b

View File

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