fix search action

This commit is contained in:
Michael 2017-04-07 10:52:56 -04:00
parent 626b027787
commit 97e67c021d

View file

@ -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);
}
}
}