public VoucherController(VoucherContext context, ILightning lightning) { _context = context; _lightning = lightning; if (_context.VoucherItems.Count() == 0) { // Create a new TodoItem if collection is empty, // which means you can't delete all TodoItems. _context.VoucherItems.Add(new VoucherItem() { StartSat = 2 }); _context.SaveChanges(); } if (_context.VoucherBuyItems.Count() == 0) { _context.VoucherBuyItems.Add(new VoucherBuyItem() { Amount = 3, claimed = false, Id = "lnbc150n1pwr7z63pp568q60gxz5ta69v6jqxxpnlt2yg006hvkcq6pn8s5lc03pmkk3yzqdqqcqzyskp254xkgme7knwf0ygufdr7t24zz0dnctglttv8ezk0r9t4jhyh4q8eenjc0vgc59jladn50wxupua2sm624sp57cg4z9j8p3phd76qqlx6tn3", SatPerVoucher = 5 }); _context.SaveChanges(); } }
public HomeController(ILightning lightning) { this._lightning = lightning; }