// This method gets called by the runtime. Use this method to add services to the container. public void ConfigureServices(IServiceCollection services) { services.AddDbContext <AcademyDbContext>(options => options.UseSqlServer(Configuration.GetConnectionString("AcademyDbContext"), b => b.MigrationsAssembly("AcademyASPNET"))); var bootstrapper = new Bootstraper(); bootstrapper.Init(); services.AddControllers(); }
public static void RegisterComponents() { var container = new UnityContainer(); // register all your components with the container here // it is NOT necessary to register your controllers // e.g. container.RegisterType<ITestService, TestService>(); Bootstraper.Init(container); GlobalConfiguration.Configuration.DependencyResolver = new UnityDependencyResolver(container); }
public OrderController() { _orderDomain = Bootstraper.Init().Resolve <OrderDomain>(); _attachmentDomain = Bootstraper.Init().Resolve <AttachmentDomain>(); }
protected override void OnStartup(StartupEventArgs e) { base.OnStartup(e); Bootstraper.Init(); }
public AttachmentController() { _attachmentDomain = Bootstraper.Init().Resolve <AttachmentDomain>(); }
public UniversalCatalogController() { _catalogDomain = Bootstraper.Init().Resolve <CatalogDomain>(); }
public EquipmentController() { _equipmentDomain = Bootstraper.Init().Resolve <EquipmentDomain>(); }
public ContactPersonController() { _contactDomain = Bootstraper.Init().Resolve <ContactDomain>(); }
public ContactBankAccountController() { _contactDomain = Bootstraper.Init().Resolve <ContactDomain>(); }