Use file-scoped namespaces

This commit is contained in:
Andriy
2023-07-29 15:14:52 +03:00
parent a24332370d
commit 8ab067a027
58 changed files with 2222 additions and 2280 deletions
+17 -18
View File
@@ -1,25 +1,24 @@
using Kruzya.TelegramBot.Core.EF;
using Microsoft.EntityFrameworkCore;
namespace Kruzya.TelegramBot.Core.Data
namespace Kruzya.TelegramBot.Core.Data;
public class CoreContext : AutoSaveDbContext
{
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)
{
/// <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();
}
Database.Migrate();
}
}