public HorebUserCollection FindByName(string name) { HorebUserCollection collection = new HorebUserCollection(); foreach (HorebUser currentUser in _userCollection) { if (currentUser.Name.Contains(name)) { collection.Add(currentUser); } } return(collection); }
public HorebUserCollection GetAll(int startAt, int range) { HorebUserCollection collection = new HorebUserCollection(); int loopCounter = 0; foreach (HorebUser currentUser in _userCollection) { if (loopCounter >= startAt && loopCounter < startAt + range) { collection.Add(currentUser); } } return(collection); }
public MockUserDao() { _userCollection = new HorebUserCollection(); HorebUser userOne = Insert("ricardoDuran1", "easyPass123"); userOne.CreatedById = "rootUser"; userOne.Email = "*****@*****.**"; userOne.PhoneNumber = "6197201905"; Update(userOne); HorebUser userTwo = Insert("mockUser9", "anotherEasyPass321"); userOne.CreatedById = "rootUser"; userOne.Email = "*****@*****.**"; userOne.PhoneNumber = "8585617899"; Update(userOne); }