using ASC.Common; using Microsoft.EntityFrameworkCore; namespace ASC.Core.Common.EF { public class CoreDbContext : BaseDbContext { public DbSet Tariffs { get; set; } public DbSet Buttons { get; set; } public DbSet Acl { get; set; } public DbSet Quotas { get; set; } public DbSet QuotaRows { get; set; } public CoreDbContext() { } public CoreDbContext(DbContextOptions options) : base(options) { } protected override void OnModelCreating(ModelBuilder modelBuilder) { _ = modelBuilder .AddAcl() .AddDbButton() .AddDbQuotaRow(); } } public static class CoreDbExtension { public static DIHelper AddCoreDbContextService(this DIHelper services) { return services.AddDbContextManagerService(); } } }