From 97e67c021d2dc896ac4f27c2094f147b8cb14274 Mon Sep 17 00:00:00 2001 From: Michael Date: Fri, 7 Apr 2017 10:52:56 -0400 Subject: [PATCH] fix search action --- Project-Unite/Controllers/HomeController.cs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/Project-Unite/Controllers/HomeController.cs b/Project-Unite/Controllers/HomeController.cs index 85570a8..173dc35 100644 --- a/Project-Unite/Controllers/HomeController.cs +++ b/Project-Unite/Controllers/HomeController.cs @@ -43,15 +43,14 @@ public ActionResult Search(string query) using(var db = new ApplicationDbContext()) { result.Downloads = db.Downloads.Where(x => x.Name.ToLower().Contains(query) || x.Changelog.ToLower().Contains(query)); - result.ForumPosts = db.ForumPosts.Where(x => x.Body.ToLower().Contains(query)); result.ForumTopics = db.ForumTopics.Where(x => x.Subject.ToLower().Contains(query)); result.Skins = db.Skins.Where(x => x.Name.ToLower().Contains(query) || x.ShortDescription.ToLower().Contains(query) || x.FullDescription.ToLower().Contains(query)); result.Users = db.Users.Where(x => x.DisplayName.ToLower().Contains(query)||x.Bio.ToLower().Contains(query)||x.Interests.ToLower().Contains(query)||x.Hobbies.ToLower().Contains(query)); result.WikiPages = db.WikiPages.Where(x => x.Name.ToLower().Contains(query) || x.Contents.ToLower().Contains(query)); + //Holy crap that search was... long. + return View(result); } - //Holy crap that search was... long. - return View(result); } } } \ No newline at end of file