public HeroInfoRepository(HeroInfoContext context) { _context = context; }
// This method gets called by the runtime. Use this method to configure the HTTP request pipeline. public void Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerFactory loggerFactory, HeroInfoContext heroInfoContext) { loggerFactory.AddConsole(); app.UseMvc(); AutoMapper.Mapper.Initialize(cfg => { cfg.CreateMap <Entities.Hero, Models.HeroDto>(); cfg.CreateMap <Entities.CounterPick, Models.CounterPickDto>(); }); heroInfoContext.EnsureSeedDataForContext(); if (env.IsDevelopment()) { app.UseDeveloperExceptionPage(); } app.Run(async(context) => { await context.Response.WriteAsync("Hello World!"); }); }