Massive cleanup

- Removed GuildConfigs repository, moved to extensions
- Moved StreamSettings extension to GuildConfig extensions
- namespace NadekoBot.Core has been simplified to NadekoBot in many places (more to come)
- Replaced some raw delete queries with simple linqtodb queries
This commit is contained in:
Kwoth
2021-06-19 03:32:48 +02:00
parent c7ff982ec1
commit 15dac7e3ed
191 changed files with 563 additions and 571 deletions

View File

@@ -4,7 +4,7 @@ using System.Diagnostics.CodeAnalysis;
using System.Threading.Tasks;
using Discord;
using NadekoBot.Core.Common;
using NadekoBot.Core.Modules.Music;
using NadekoBot.Modules.Music;
using NadekoBot.Core.Services.Database.Models;
namespace NadekoBot.Modules.Music.Services

View File

@@ -7,10 +7,13 @@ using System.Linq;
using System.Threading.Tasks;
using Discord;
using Discord.WebSocket;
using NadekoBot.Core.Modules.Music;
using NadekoBot.Core.Services;
using NadekoBot.Core.Services.Database.Models;
using NadekoBot.Core.Services.Database.Repositories.Impl;
using NadekoBot.Modules.Music;
using NadekoBot.Services;
using NadekoBot.Services.Database.Models;
using NadekoBot.Services.Database.Repositories.Impl;
using NadekoBot.Extensions;
using Serilog;

View File

@@ -82,7 +82,7 @@
// {
// using (var uow = _db.GetDbContext())
// {
// return uow.GuildConfigs.ForId(guildId, set => set).DefaultMusicVolume;
// return uow._context.GuildConfigsForId(guildId, set => set).DefaultMusicVolume;
// }
// });
// }
@@ -256,7 +256,7 @@
// bool val;
// using (var uow = _db.GetDbContext())
// {
// var gc = uow.GuildConfigs.ForId(id, set => set);
// var gc = uow._context.GuildConfigsForId(id, set => set);
// val = gc.AutoDcFromVc = !gc.AutoDcFromVc;
// uow.SaveChanges();
// }
@@ -278,7 +278,7 @@
// {
// using (var uow = _db.GetDbContext())
// {
// var ms = uow.GuildConfigs.ForId(guildId, set => set.Include(x => x.MusicSettings)).MusicSettings;
// var ms = uow._context.GuildConfigsForId(guildId, set => set.Include(x => x.MusicSettings)).MusicSettings;
// ms.MusicChannelId = cid;
// uow.SaveChanges();
// }
@@ -288,7 +288,7 @@
// {
// using (var uow = _db.GetDbContext())
// {
// var ms = uow.GuildConfigs.ForId(guildId, set => set.Include(x => x.MusicSettings)).MusicSettings;
// var ms = uow._context.GuildConfigsForId(guildId, set => set.Include(x => x.MusicSettings)).MusicSettings;
// ms.SongAutoDelete = val;
// uow.SaveChanges();
// }