Esempio n. 1
0
        // 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();
        }
Esempio n. 2
0
        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);
        }
Esempio n. 3
0
 public OrderController()
 {
     _orderDomain      = Bootstraper.Init().Resolve <OrderDomain>();
     _attachmentDomain = Bootstraper.Init().Resolve <AttachmentDomain>();
 }
Esempio n. 4
0
 protected override void OnStartup(StartupEventArgs e)
 {
     base.OnStartup(e);
     Bootstraper.Init();
 }
Esempio n. 5
0
 public AttachmentController()
 {
     _attachmentDomain = Bootstraper.Init().Resolve <AttachmentDomain>();
 }
 public UniversalCatalogController()
 {
     _catalogDomain = Bootstraper.Init().Resolve <CatalogDomain>();
 }
Esempio n. 7
0
 public EquipmentController()
 {
     _equipmentDomain = Bootstraper.Init().Resolve <EquipmentDomain>();
 }
Esempio n. 8
0
 public ContactPersonController()
 {
     _contactDomain = Bootstraper.Init().Resolve <ContactDomain>();
 }
Esempio n. 9
0
 public ContactBankAccountController()
 {
     _contactDomain = Bootstraper.Init().Resolve <ContactDomain>();
 }