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.AddControllersWithViews();

            // app Settings config
            services.Configure <AppSettings>(Configuration.GetSection("Apis"));

            // Infra
            InfrastructureDependencyContainer.RegisterServices(services);
        }
Ejemplo n.º 2
0
        // This method gets called by the runtime. Use this method to add services to the container.
        public void ConfigureServices(IServiceCollection services)
        {
            services.AddControllers();

            // app Settings config
            services.Configure <AppSettings>(Configuration.GetSection("Apis"));

            // Services
            services.AddTransient <IEmployeeService, EmployeeService>();
            services.AddTransient <IEmployeeRepository, EmployeeRepository>();

            services.AddAutoMapper();

            // Infra
            InfrastructureDependencyContainer.RegisterServices(services);
        }