예제 #1
0
 public IActionResult Email(string email)
 {
     if (ModelState.IsValid)
     {
         ViewBag.Title       = "Search Result | The Phone Book";
         ViewBag.SearchEmail = email;
         ViewBag.Subtitle    = $"Search by email address: {ViewBag.SearchEmail}";
         var searchList = SourceManager.GetByEmail(email);
         return(View("List", searchList));
     }
     TempData["WrongData"] = "Wrong data. Try again.";
     return(View());
 }