Files
telegram-bot/Core/Data/CoreContext.cs
T

19 lines
457 B
C#
Raw Normal View History

2020-03-08 01:55:50 +04:00
using Microsoft.EntityFrameworkCore;
namespace Kruzya.TelegramBot.Core.Data
{
public class CoreContext : DbContext
{
/// <summary>
/// The all known users.
/// </summary>
public DbSet<BotUser> Users { get; set; }
public DbSet<BotUserValue> UserValues { get; set; }
public CoreContext(DbContextOptions<CoreContext> ctx) : base(ctx)
{
Database.Migrate();
}
}
}