public TransactionBehaviorTests() { _builder = WebHost.CreateDefaultBuilder() .UseContentRoot(Directory.GetCurrentDirectory()) .UseStartup <Startup>() .Build(); // Creates the dependency injection scope. _scope = _builder.Services.CreateScope(); // Dependency injection variables _mediator = _scope.ServiceProvider.GetRequiredService <IMediator>(); // Get DbContext _context = _scope.ServiceProvider.GetRequiredService <DB1Context>(); _context2 = _scope.ServiceProvider.GetRequiredService <DB2Context>(); }
public FactoriesController(DB1Context context, IHubContext <NotifyHub, ITypedHubClient> hubContext) { this._context = context; this._hubContext = hubContext; }
public FactoryNodeBuilder(DB1Context context) { _context = context; }