// This method gets called by the runtime. Use this method to add services to the container. public void ConfigureServices(IServiceCollection services) { services.AddDbContext <TelemetryContext>(options => options.UseSqlServer(Configuration.GetConnectionString("RequestTelemetryDbConnection"))); services.AddScoped <RateService>(); services.AddScoped <FetchService>(); services.AddScoped <IWebRequester, WebRequester>(); services.AddAutoMapper(AutoMapperDomainConfiguration.Configuration(), Assembly.GetExecutingAssembly()); services.AddHangfire(options => options.UseSqlServerStorage(Configuration.GetConnectionString("RequestTelemetryDbConnection"))); services.AddControllers(); }
public void Setup() { _mapper = new MapperConfiguration(AutoMapperDomainConfiguration.Configuration()).CreateMapper(); }