mirror of
https://github.com/lempamo/Project-Unite.git
synced 2025-01-22 11:21:47 -05:00
fix search action
This commit is contained in:
parent
626b027787
commit
97e67c021d
1 changed files with 2 additions and 3 deletions
|
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue