// 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, GettingStartedContext context) { loggerFactory.AddConsole(); loggerFactory.AddDebug(); loggerFactory.AddDebug(LogLevel.Information); app.UseMvc(); if (env.IsDevelopment()) { app.UseDeveloperExceptionPage(); } else { app.UseExceptionHandler(); } context.EnsureSeedDataForContext(); AutoMapper.Mapper.Initialize(cfg => { cfg.CreateMap <Employee, EmployeeDTO>(); }); }
public EmployeeRepository(GettingStartedContext ctx) { _ctx = ctx; }