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