private void GetUsers() { _UserViewModels.Clear(); foreach (var c in _Service.GetAllUsers()) { _UserViewModels.Add(new UserItemViewModel(c.Id, c.FirstName, c.LastName)); } OnPropertyChanged(nameof(UserViewModels)); }
public void GetUsersTest() { UserCRUD userService = new UserCRUD(new TestDataRepository()); userService.AddUser(16, "Wartłomiej", "Błodarski"); userService.AddUser(19, "Kaciej", "Mopa"); userService.AddUser(22, "Wartłomiej", "Bubicki"); IEnumerable <UserDTO> users = userService.GetAllUsers(); Assert.AreEqual(users.Count(), 3); userService.DeleteUser(16); userService.DeleteUser(19); userService.DeleteUser(22); }
public static ObservableCollection <UserModel> GetUsers() { models = (ObservableCollection <UserModel>)UserCRUD.GetAllUsers(); return(models); }
public IList <User> GetAllUsers(string sortOrder, string searchString) { return(userTableActions.GetAllUsers(sortOrder, searchString)); }