1
0
mirror of https://github.com/Radarr/Radarr.git synced 2024-11-05 10:32:35 +01:00
Radarr/NzbDrone.Core/Datastore/Database.cs

28 lines
551 B
C#
Raw Normal View History

2013-03-25 04:51:32 +01:00
using System;
using Marr.Data;
namespace NzbDrone.Core.Datastore
{
public interface IDatabase
{
IDataMapper DataMapper { get; }
}
public class Database : IDatabase
{
2013-05-11 22:06:57 +02:00
private readonly Func<IDataMapper> _dataMapperFactory;
2013-03-25 04:51:32 +01:00
2013-05-11 22:06:57 +02:00
public Database(Func<IDataMapper> dataMapperFactory)
2013-03-25 04:51:32 +01:00
{
2013-05-11 22:06:57 +02:00
_dataMapperFactory = dataMapperFactory;
2013-03-25 04:51:32 +01:00
}
2013-05-11 22:06:57 +02:00
public IDataMapper DataMapper
{
get
{
return _dataMapperFactory();
}
}
2013-03-25 04:51:32 +01:00
}
}