mirror of
https://github.com/Bubuni-Team/telegram-bot.git
synced 2026-07-31 00:29:24 +03:00
24 lines
591 B
C#
24 lines
591 B
C#
using Kruzya.TelegramBot.Core.EF;
|
|
using Microsoft.EntityFrameworkCore;
|
|
|
|
namespace Kruzya.TelegramBot.Core.Data;
|
|
|
|
public class CoreContext : AutoSaveDbContext
|
|
{
|
|
/// <summary>
|
|
/// The all known users.
|
|
/// </summary>
|
|
public DbSet<BotUser> Users { get; set; }
|
|
|
|
/// <summary>
|
|
/// The all knows user options and values.
|
|
/// </summary>
|
|
public DbSet<BotUserValue> UserValues { get; set; }
|
|
|
|
public DbSet<ChatOptionValue> ChatOptionValues { get; set; }
|
|
|
|
public CoreContext(DbContextOptions<CoreContext> ctx) : base(ctx)
|
|
{
|
|
Database.Migrate();
|
|
}
|
|
} |