removed sqo.

This commit is contained in:
kay.one 2013-03-23 21:16:00 -07:00
commit 1a4f3fad25
64 changed files with 292 additions and 1323 deletions

View file

@ -1,4 +1,5 @@
using System;
using System.Data;
using System.Linq;
using NzbDrone.Core.Datastore;
@ -11,14 +12,14 @@ namespace NzbDrone.Core.Instrumentation
public class LogRepository : BasicRepository<Log>, ILogRepository
{
public LogRepository(IObjectDatabase objectDatabase)
: base(objectDatabase)
public LogRepository(IDbConnection database)
: base(database)
{
}
public void Trim()
{
var oldIds = Queryable.Where(c => c.Time < DateTime.Now.AddDays(-30).Date).Select(c => c.Id);
var oldIds = Where(c => c.Time < DateTime.Now.AddDays(-30).Date).Select(c => c.Id);
DeleteMany(oldIds);
}
}