added Marr.Data.Mapping

This commit is contained in:
kay.one 2013-03-24 20:51:32 -07:00
commit 6dd56114e3
29 changed files with 208 additions and 229 deletions

View file

@ -12,14 +12,14 @@ namespace NzbDrone.Core.Instrumentation
public class LogRepository : BasicRepository<Log>, ILogRepository
{
public LogRepository(IDbConnection database)
public LogRepository(IDatabase database)
: base(database)
{
}
public void Trim()
{
var oldIds = Where(c => c.Time < DateTime.Now.AddDays(-30).Date).Select(c => c.Id);
var oldIds = Queryable().Where(c => c.Time < DateTime.Now.AddDays(-30).Date).Select(c => c.Id);
DeleteMany(oldIds);
}
}