using DG.EntityFramework; using Microsoft.EntityFrameworkCore; using Microsoft.Extensions.Logging; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace Zxd.EntityFramework { public class CompanyBaseConfDbContext : DbContext { public CompanyBaseConfDbContext(DbContextOptions options) : base(options) { } protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder) { if (Environment.GetEnvironmentVariable("ASPNETCORE_ENVIRONMENT") == "Development") { var loggerFactory = new LoggerFactory(); loggerFactory.AddProvider(new EFLoggerProvider()); optionsBuilder.UseLoggerFactory(loggerFactory); } base.OnConfiguring(optionsBuilder); } public DbSet DepartmentCrmconf { get; set; } public DbSet EmployeeDepartmentDetail { get; set; } public DbSet EmployeeDepartment { get; set; } public DbSet Application { get; set; } public DbSet ApplicationDepartment { get; set; } public DbSet Employee { get; set; } public DbSet Department { get; set; } } }