fixed marr threading bug.

datamapper instances should not be reused!!!
This commit is contained in:
Keivan Beigi 2013-07-15 17:45:49 -07:00
commit 28a919e74a
5 changed files with 24 additions and 24 deletions

View file

@ -43,7 +43,7 @@ namespace NzbDrone.Core.Datastore
private IDataMapper DataMapper
{
get { return _database.DataMapper; }
get { return _database.GetDataMapper(); }
}
public BasicRepository(IDatabase database, IMessageAggregator messageAggregator)

View file

@ -5,7 +5,7 @@ namespace NzbDrone.Core.Datastore
{
public interface IDatabase
{
IDataMapper DataMapper { get; }
IDataMapper GetDataMapper();
}
public class Database : IDatabase
@ -17,12 +17,9 @@ namespace NzbDrone.Core.Datastore
_dataMapperFactory = dataMapperFactory;
}
public IDataMapper DataMapper
public IDataMapper GetDataMapper()
{
get
{
return _dataMapperFactory();
}
return _dataMapperFactory();
}
}
}