Exemplo 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.AddControllers();
     services.AddDatabaseInfrastructure(Configuration);
     InfrastructureRegister.Register(services, Configuration);
     services.AddCors(); // cors service
 }
Exemplo n.º 2
0
        // This method gets called by the runtime. Use this method to add services to the container.
        public void ConfigureContainer(ServiceRegistry services)
        {
            services.AddControllers();

            InfrastructureRegister.Register(services, Configuration);
            services.IncludeRegistry <ServiceRegister>();
            services.Scan(s =>
            {
                s.TheCallingAssembly();
                s.WithDefaultConventions();
            });

            services.AddCors();
        }