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.AddScoped <CharacterManager>();
            services.AddScoped <ISwAPI, SwAPI>();

            //// Inyecciones de la capa de persistencia
            StartUpPersistence.AddPersistenceDI(services);


            services.AddResponseCaching();
            services.AddMemoryCache();
            services.AddMvc().SetCompatibilityVersion(CompatibilityVersion.Version_2_1);
        }
Ejemplo n.º 2
0
 public Startup(IConfiguration configuration)
 {
     StartUpPersistence.CreateDbContext();
     Configuration = configuration;
 }