// 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); }
public Startup(IConfiguration configuration) { StartUpPersistence.CreateDbContext(); Configuration = configuration; }