Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public partial class CoreContext
- {
- public CoreContext(
- DbContextOptions<CoreContext> options,
- IUserService userService,
- IAuditRepository auditRepository
- ) : base(options) {...}
- }
- public partial class CoreContext : DbContext
- {
- public CoreContext(DbContextOptions<CoreContext> options) : base(options) {}
- }
- public class Program
- {
- public static void Main(string[] args)
- {
- BuildWebHost(args).Run();
- }
- public static IWebHost BuildWebHost(string[] args) =>
- WebHost.CreateDefaultBuilder(args)
- .UseKestrel()
- .UseContentRoot(Directory.GetCurrentDirectory())
- .UseIISIntegration()
- .UseStartup<Startup>()
- .Build();
- }
- public IServiceProvider ConfigureServices(IServiceCollection services)
- {
- ...
- services.AddDbContextPool<CoreContext>(options => options.UseSqlServer(absConnectionString));
- ...
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement