/** * <summary> * Creates a new income calculator based on the poverty line * configuration in the database * </summary> * * <param name="db">Database connection</param> */ public IncomeCalculator(GoldenTicketDbContext db) { this.db = db; for (var i = 2; i <= 10; i++) { povertyLineByNumPeople.Add(i, db.PovertyConfigs.Find(i).MinimumIncome); } var globalConfig = db.GlobalConfigs.First(); above10Multipler = globalConfig.IncomeMultiplier; }
public CrossSchoolReconciler(GoldenTicketDbContext db) { this.db = db; lottery = new SchoolLottery(db); }
/** * <summary>Creates a new lottery algorithm object</summary> * <param name="db">Database connection</param> */ public SchoolLottery(GoldenTicketDbContext db) { this.db = db; this.incomeCalculator = new IncomeCalculator(db); }
/** * <summary>Create a new SharedViewHelper</summary> */ public SharedViewHelper(GoldenTicketDbContext database) { this.database = database; }