mirror of
https://github.com/Sonarr/Sonarr.git
synced 2024-11-01 08:22:35 +01:00
28 lines
551 B
C#
28 lines
551 B
C#
using System;
|
|
using Marr.Data;
|
|
|
|
namespace NzbDrone.Core.Datastore
|
|
{
|
|
public interface IDatabase
|
|
{
|
|
IDataMapper DataMapper { get; }
|
|
}
|
|
|
|
public class Database : IDatabase
|
|
{
|
|
private readonly Func<IDataMapper> _dataMapperFactory;
|
|
|
|
public Database(Func<IDataMapper> dataMapperFactory)
|
|
{
|
|
_dataMapperFactory = dataMapperFactory;
|
|
}
|
|
|
|
public IDataMapper DataMapper
|
|
{
|
|
get
|
|
{
|
|
return _dataMapperFactory();
|
|
}
|
|
}
|
|
}
|
|
} |