Guest User

Untitled

a guest
Oct 23rd, 2017
61
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.48 KB | None | 0 0
  1. [HttpPost]
  2. public ActionResult Search (string[] jsonString)
  3. {
  4. IQueryable <UploadedFile> res = Context.UploadedFiles;
  5. if (!string.IsNullOrEmpty(jsonString[0]))
  6. {
  7. res = res.Where(x => x.FileTitle.Contains(jsonString[0]));
  8. }
  9.  
  10.  
  11. return View("UploadFilesView", res.ToList());
  12. }
  13.  
  14. res = res.Where(x => x.FileTitle.Contains(jsonString[0]));
  15.  
  16. var buffer = jsonString[0];
  17.  
  18. res = res.Where(x => x.FileTitle.Contains(buffer));
Add Comment
Please, Sign In to add comment