public MemberController(NarfoContext db) { _db = db; if (!_db.Members.Any()) { Member newMember = new Member(); newMember.LastName = "admin"; newMember.Username = "******"; newMember.FirstName = "admin"; newMember.Password = Encript.Encrypt_user("admin"); _db.Members.AddAsync(newMember); _db.SaveChanges(); } }
public EmployeeController(NarfoContext db) { _db = db; if (!_db.Employees.Any()) { Employee newEmployee = new Employee(); newEmployee.Name = "admin"; newEmployee.Surname = "admin"; newEmployee.Gender = "admin"; newEmployee.DOB = "admin"; newEmployee.Status = true; _db.Employees.AddAsync(newEmployee); _db.SaveChanges(); } }