fixed container registration.

pull/4/head
kay.one 12 years ago
parent 63ba1ed026
commit e0b881fe4b

@ -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<>));
}

Loading…
Cancel
Save