Ejemplo n.º 1
0
 public IActionResult Search(string search)
 {
     try
     {
         if (User.Identity.Name == null)
         {
             return(View(_helper.ParseSearchJson(_helper.GetSearchJson(search)).ToArray()));
         }
         return(View(_helper.CheckDbStateOfFilms(_helper.ParseSearchJson(_helper.GetSearchJson(search)), _dbContext,
                                                 _userManager.GetUserAsync(User).Result.Id).ToArray()));
     }
     catch (Exception)
     {
         return(RedirectToAction(nameof(HomeController.ConnectionFailed), "Home"));
     }
 }