Removed module projects because it can't work like that atm. Commented out package commands.
This commit is contained in:
@ -1,10 +0,0 @@
|
||||
using NadekoBot.Core.Services.Database.Models;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace NadekoBot.Core.Services.Database.Repositories
|
||||
{
|
||||
public interface IClashOfClansRepository : IRepository<ClashWar>
|
||||
{
|
||||
IEnumerable<ClashWar> GetAllWars(List<long> guilds);
|
||||
}
|
||||
}
|
@ -1,24 +0,0 @@
|
||||
using NadekoBot.Core.Services.Database.Models;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
|
||||
namespace NadekoBot.Core.Services.Database.Repositories.Impl
|
||||
{
|
||||
public class ClashOfClansRepository : Repository<ClashWar>, IClashOfClansRepository
|
||||
{
|
||||
public ClashOfClansRepository(DbContext context) : base(context)
|
||||
{
|
||||
}
|
||||
|
||||
public IEnumerable<ClashWar> GetAllWars(List<long> guilds)
|
||||
{
|
||||
var toReturn = _set
|
||||
.Where(cw => guilds.Contains((long)cw.GuildId))
|
||||
.Include(cw => cw.Bases)
|
||||
.ToList();
|
||||
toReturn.ForEach(cw => cw.Bases = cw.Bases.Where(w => w.SequenceNumber != null).OrderBy(w => w.SequenceNumber).ToList());
|
||||
return toReturn;
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user