Scratch for running next callbacks in queue

This commit is contained in:
2020-03-09 19:31:16 +04:00
parent 73cfe51312
commit 8681c7cf69
3 changed files with 34 additions and 0 deletions
+13
View File
@@ -1,3 +1,4 @@
using System.Threading.Tasks;
using Microsoft.EntityFrameworkCore;
namespace Kruzya.TelegramBot.Core.Data
@@ -11,6 +12,18 @@ namespace Kruzya.TelegramBot.Core.Data
public DbSet<BotUserValue> UserValues { get; set; }
public override void Dispose()
{
SaveChanges();
base.Dispose();
}
public override ValueTask DisposeAsync()
{
SaveChanges();
return base.DisposeAsync();
}
public CoreContext(DbContextOptions<CoreContext> ctx) : base(ctx)
{
Database.Migrate();