Changed the way the Database is registered with TinyIoC to make Logdb and future cachedb more accessible.

This commit is contained in:
Taloth Saldono
2015-05-03 21:46:21 +02:00
parent 4ca8178ca8
commit 2a83088045
47 changed files with 181 additions and 72 deletions
@@ -0,0 +1,38 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Marr.Data;
namespace NzbDrone.Core.Datastore
{
public interface IMainDatabase : IDatabase
{
}
public class MainDatabase : IMainDatabase
{
private readonly IDatabase _database;
public MainDatabase(IDatabase database)
{
_database = database;
}
public IDataMapper GetDataMapper()
{
return _database.GetDataMapper();
}
public Version Version
{
get { return _database.Version; }
}
public void Vacuum()
{
_database.Vacuum();
}
}
}