public ItemController(lostfoundcontext db) { this.db = db; if (this.db.Items.Count() == 0) { this.db.Items.Add(new Item { Id = 1, Category = "test item" }); this.db.SaveChanges(); } }
public UserController(lostfoundcontext db) { this.db = db; if (this.db.Users.Count() == 0) { this.db.Users.Add(new User { Id = 0, username = "******", emailaddr = "test email", phonenum = "test number", password = "******" }); this.db.SaveChanges(); } }