mirror of
https://github.com/collinbarrett/FilterLists.git
synced 2026-03-11 09:04:27 +00:00
parent
8b00cf5ed6
commit
b5f83647d9
2 changed files with 2 additions and 2 deletions
|
|
@ -15,7 +15,7 @@ namespace FilterLists.Services.Snapshot
|
|||
{
|
||||
public class Snapshot
|
||||
{
|
||||
private const int BatchSize = 250;
|
||||
private const int BatchSize = 1000;
|
||||
private readonly FilterListsDbContext dbContext;
|
||||
private readonly FilterListViewUrlDto list;
|
||||
private readonly Data.Entities.Snapshot snapEntity;
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@ public async Task SaveAsync()
|
|||
}
|
||||
|
||||
private IQueryable<Rule> GetExistingRules() =>
|
||||
dbContext.Rules.Join(lines, rule => rule.Raw, line => line, (rule, line) => rule);
|
||||
dbContext.Rules.Where(r => lines.Contains(r.Raw));
|
||||
|
||||
private List<Rule> CreateNewRules(IQueryable<Rule> existingRules) =>
|
||||
lines.Except(existingRules.Select(r => r.Raw)).Select(r => new Rule {Raw = r}).ToList();
|
||||
|
|
|
|||
Loading…
Reference in a new issue