public ActionResult Index() { var userRepository = new UserRepository(); List<User> allUsers = userRepository.GetAllUsers(); UsersViewModel viewModel = userViewModelMapper.MapToViewModel(allUsers); return View(viewModel); }
public void GivenIHaveUsersNamedGeorgeMary(string users) { var userRepository = new UserRepository(); foreach (var s in users.Split(',')) { userRepository.AddUser(new User { Name = s}); } }