mirror of
https://github.com/lidarr/lidarr.git
synced 2025-07-30 11:48:26 -07:00
First steps for SQLite
This commit is contained in:
parent
29ec800996
commit
ebbf5ea21f
10 changed files with 231 additions and 29 deletions
|
@ -1,4 +1,5 @@
|
|||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Reflection;
|
||||
|
@ -57,7 +58,12 @@ namespace NzbDrone.Core
|
|||
var appDataPath = new EnvironmentProvider().GetAppDataPath();
|
||||
if (!Directory.Exists(appDataPath)) Directory.CreateDirectory(appDataPath);
|
||||
|
||||
container.Register(c =>
|
||||
{
|
||||
return c.Resolve<IDbFactory>().Create();
|
||||
}).As<IDbConnection>().SingleInstance();
|
||||
|
||||
container.RegisterGeneric(typeof(BasicDb<>)).As(typeof(IBasicDb<>));
|
||||
|
||||
container.Register(c =>
|
||||
{
|
||||
|
@ -65,6 +71,7 @@ namespace NzbDrone.Core
|
|||
}).As<IObjectDatabase>().SingleInstance();
|
||||
|
||||
container.RegisterGeneric(typeof(BasicRepository<>)).As(typeof(IBasicRepository<>));
|
||||
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue