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