Esempio n. 1
0
 public void TestUserSearch()
 {
     String searchString = "q3";
     IUserService userService = new UserService();
     IList<UserBookRequest> returnedList  = userService.UserSearch(searchString);
     foreach (var ubr in returnedList)
     {
         Console.WriteLine(ubr.BookRequest.Book.Name);
     }
     Assert.IsNotNull(returnedList);
 }
Esempio n. 2
0
 public ActionResult SearchUser(String userId, String searchString)
 {
     try
     {
         ViewBag.userId = userId;
         IUserService userService = new UserService();
         IList<UserBookRequest> userList = userService.UserSearch(searchString);
         return View(userList);
     }
     catch (Exception e)
     {
         Console.WriteLine("SearchUser Error");
         Console.Write(e.ToString());
         return Content("Error");
     }
 }