using ASC.Core.Common.EF.Model; using Microsoft.EntityFrameworkCore; using Microsoft.Extensions.DependencyInjection; namespace ASC.Core.Common.EF.Context { public class DbContext : BaseDbContext { public DbSet MobileAppInstall { get; set; } public DbSet DbipLocation { get; set; } public DbSet Regions { get; set; } public DbContext() { } public DbContext(DbContextOptions options) : base(options) { } protected override void OnModelCreating(ModelBuilder modelBuilder) { modelBuilder.AddMobileAppInstall(); } } public static class DbContextExtension { public static IServiceCollection AddDbContextService(this IServiceCollection services) { return services.AddDbContextManagerService(); } } }