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.
28 lines
551 B
28 lines
551 B
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();
|
|
}
|
|
}
|
|
}
|
|
} |