static void Main(string[] args) { var repository = new Repository(true); repository.AddUser(new User() { Username = "******", Name = "John Smith", Email = "*****@*****.**" }); repository.AddUser(new User() { Username = "******", Name = "Jane Doe", Email = "*****@*****.**" }); var users = repository.GetUsers(); users.ForEach(u => Console.WriteLine("UserID: {0}", u.UserID)); Console.WriteLine("Number of Users: {0}", users.Count); Console.WriteLine("Press Enter to continue"); Console.Read(); }
// TODO add constructor that accepts a IRepository interface public UsersController() { _repository = new Repository(); }