public TaxImporter(TaxesContext taxes) { this.db = taxes; csvConfiguration = new CsvConfiguration(); csvConfiguration.RegisterClassMap <TaxMap>(); csvConfiguration.HasHeaderRecord = true; csvConfiguration.TrimFields = true; csvConfiguration.Delimiter = ";"; csvConfiguration.SkipEmptyRecords = true; TypeConverterFactory.AddConverter <double>(new DoubleConverter()); }
public static IHostBuilder CreateHostBuilder(string[] args) => Host.CreateDefaultBuilder(args) .ConfigureWebHostDefaults(webBuilder => //Seed Data { var db = new TaxesContext(); db.TaxesItem.Add(new TaxesItem { Id = 1, Municipality = "istanbul", Date = DateTime.UtcNow, TaxesSchedule = "yearly", TaxesRatio = 4 }); db.TaxesItem.Add(new TaxesItem { Id = 2, Municipality = "berlin", Date = DateTime.UtcNow.AddDays(-60), TaxesSchedule = "daily", TaxesRatio = 2 }); db.SaveChanges(); db.Dispose(); webBuilder.UseStartup <Startup>(); });
public TaxesController(TaxesContext context, ITaxesService businessService, IMapper mapper) { _context = context; _businessService = businessService; _mapper = mapper; }
public Worker(TaxesContext taxes) { this.db = taxes; }
public TaxesService(TaxesContext context) { _context = context; }