1
0
Fork 0
mirror of https://github.com/lidarr/Lidarr synced 2025-03-04 02:18:06 +00:00
Lidarr/NzbDrone.Core/Datastore/Database.cs

28 lines
551 B
C#
Raw Normal View History

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