Performance improvements. Timely command almost done

This commit is contained in:
Master Kwoth
2017-10-26 11:31:44 +02:00
parent ffcaa594c9
commit 8220487672
18 changed files with 2084 additions and 23 deletions

View File

@ -190,7 +190,7 @@ namespace NadekoBot.Modules.Administration
{
using (var uow = _db.UnitOfWork)
{
var config = uow.BotConfig.GetOrCreate();
var config = uow.BotConfig.GetOrCreate(set => set);
config.ForwardMessages = !config.ForwardMessages;
uow.Complete();
}
@ -208,7 +208,7 @@ namespace NadekoBot.Modules.Administration
{
using (var uow = _db.UnitOfWork)
{
var config = uow.BotConfig.GetOrCreate();
var config = uow.BotConfig.GetOrCreate(set => set);
lock (_locker)
config.ForwardToAllOwners = !config.ForwardToAllOwners;
uow.Complete();