public static int Main(string[] args) { AutoMapperDomainConfiguration.Configure(); SyncHistory(); return(0); }
// 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 static int Main(string[] args) { //Func<Referral, bool> LastNamesMatch = delegate(Referral r) //{ // string currentUsername = UserUtils.GetCurrentUsername(User.Identity.Name); // string truncatedCurrentUsername = currentUsername.Substring(0, 8); // string referrerUsername = r.ReferrerName.Substring(0, 1) + r.ReferrerName.Substring(r.ReferrerName.IndexOf(" ") + 1, 7); // return referrerUsername.Equals(truncatedCurrentUsername); //}; AutoMapperDomainConfiguration.Configure(); //var choice = DisplayMenu(); //if (args[0] == null) //{ // if (choice == 1) // { // SyncHistory(); // } // else if (choice == 2) // { // UpdateQuotes(); // } //} //else //{ // UpdateQuotes(); //} UpdateQuotes(); //System.Console.ReadLine(); return(0); }
public static void Main(string[] args) { AutoMapperDomainConfiguration.Configure(); UpdateQuotes(); }
public void Setup() { _mapper = new MapperConfiguration(AutoMapperDomainConfiguration.Configuration()).CreateMapper(); }