You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
25 lines
505 B
25 lines
505 B
using System;
|
|
using Marr.Data;
|
|
|
|
namespace NzbDrone.Core.Datastore
|
|
{
|
|
public interface IDatabase
|
|
{
|
|
IDataMapper GetDataMapper();
|
|
}
|
|
|
|
public class Database : IDatabase
|
|
{
|
|
private readonly Func<IDataMapper> _dataMapperFactory;
|
|
|
|
public Database(Func<IDataMapper> dataMapperFactory)
|
|
{
|
|
_dataMapperFactory = dataMapperFactory;
|
|
}
|
|
|
|
public IDataMapper GetDataMapper()
|
|
{
|
|
return _dataMapperFactory();
|
|
}
|
|
}
|
|
} |