title: Issues getting the search feature to find any words in the cell in mvc5
body: <p>I can't figure how to make the search feature search by anywords that is the the description field only wants to search by one word or a word that startswith. I remember I used Like in sql command but not sure how to fit it in here.<br>
  Kbs Controller </p>
  
  <pre><code>using System;
  using System.Collections.Generic;
  using System.Data;
  using System.Data.Entity;
  using System.Linq;
  using System.Net;
  using System.Web;
  using System.Web.Mvc;
  using _399KB.Models;
  using PagedList;
  
  namespace _399KB.Controllers
  {
      public class kbsController : Controller
      {
          private kbEntities db = new kbEntities();
  
          // GET: kbs
          public ActionResult Index(string searchBy, string search, int? page)
          {
  
  
              if
                       (searchBy == "title")
                  return View(db.kbs.OrderBy(x =&gt; x.title).Where(x =&gt; x.title.StartsWith(search) || search == null).ToList().ToPagedList(page ?? 1, 5));
  
              if
                      (searchBy == "description")
                  return View(db.kbs.OrderBy(x =&gt; x.title).Where(x =&gt; x.description.StartsWith(search) || search == null).ToList().ToPagedList(page ?? 1, 5));
  
  
              if
                      (searchBy == "keywords")
                  return View(db.kbs.OrderBy(x =&gt; x.title).Where(x =&gt; x.keywords.StartsWith(search) || search == null).ToList().ToPagedList(page ?? 1, 5));
  
              if
                    (searchBy == "links")
                  return View(db.kbs.OrderBy(x =&gt; x.title).Where(x =&gt; x.links.StartsWith(search) || search == null).ToList().ToPagedList(page ?? 1, 5));
  
              else
              {
                  return View(db.kbs.OrderBy(x =&gt; x.title).Where(x =&gt; x.keywords.StartsWith(search) || search == null).ToList().ToPagedList(page ?? 1, 5));
              }
          }
  
  
          // GET: kbs/Details/5
          public ActionResult Details(int? id)
          {
              if (id == null)
              {
                  return new HttpStatusCodeResult(HttpStatusCode.BadRequest);
              }
              kb kb = db.kbs.Find(id);
              if (kb == null)
              {
                  return HttpNotFound();
              }
              return View(kb);
          }
  
          // GET: kbs/Create
          public ActionResult Create()
          {
              return View();
          }
  
          // POST: kbs/Create
          // To protect from overposting attacks, please enable the specific properties you want to bind to, for 
          // more details see http://go.microsoft.com/fwlink/?LinkId=317598.
          [HttpPost]
          [ValidateAntiForgeryToken]
          public ActionResult Create([Bind(Include = "id,title,description,keywords,links")] kb kb)
          {
              if (ModelState.IsValid)
              {
                  db.kbs.Add(kb);
                  db.SaveChanges();
                  return RedirectToAction("Index");
              }
  
              return View(kb);
          }
  
          // GET: kbs/Edit/5
          public ActionResult Edit(int? id)
          {
              if (id == null)
              {
                  return new HttpStatusCodeResult(HttpStatusCode.BadRequest);
              }
              kb kb = db.kbs.Find(id);
              if (kb == null)
              {
                  return HttpNotFound();
              }
              return View(kb);
          }
  
          // POST: kbs/Edit/5
          // To protect from overposting attacks, please enable the specific properties you want to bind to, for 
          // more details see http://go.microsoft.com/fwlink/?LinkId=317598.
          [HttpPost]
          [ValidateAntiForgeryToken]
          public ActionResult Edit([Bind(Include = "id,title,description,keywords,links")] kb kb)
          {
              if (ModelState.IsValid)
              {
                  db.Entry(kb).State = EntityState.Modified;
                  db.SaveChanges();
                  return RedirectToAction("Index");
              }
              return View(kb);
          }
  
          // GET: kbs/Delete/5
          public ActionResult Delete(int? id)
          {
              if (id == null)
              {
                  return new HttpStatusCodeResult(HttpStatusCode.BadRequest);
              }
              kb kb = db.kbs.Find(id);
              if (kb == null)
              {
                  return HttpNotFound();
              }
              return View(kb);
          }
  
          // POST: kbs/Delete/5
          [HttpPost, ActionName("Delete")]
          [ValidateAntiForgeryToken]
          public ActionResult DeleteConfirmed(int id)
          {
              kb kb = db.kbs.Find(id);
              db.kbs.Remove(kb);
              db.SaveChanges();
              return RedirectToAction("Index");
          }
  
          protected override void Dispose(bool disposing)
          {
              if (disposing)
              {
                  db.Dispose();
              }
              base.Dispose(disposing);
          }
      }
  }
  </code></pre>
  
  <p>view page</p>
  
  <pre><code>@using PagedList;
  @using PagedList.Mvc;
  @using _399KB.Models;
  
  
  @model IPagedList&lt;_399KB.Models.kb&gt;
  
  @{
      ViewBag.Title = "Index";
  }
  
  
  &lt;hr /&gt;
  
  
    &lt;!-- ** BEGIN SEARCH AREA ** --&gt;
  
  &lt;div class="panel panel-primary"&gt;
      &lt;div class="panel-heading"&gt;
          &lt;h1 class="panel-title"&gt;Search Area&lt;/h1&gt;
      &lt;/div&gt;
      &lt;div class="panel-body"&gt;
          &lt;div class="form-group"&gt;
              @using (Html.BeginForm("Index", "kbs/Index", FormMethod.Get))
              {
                  @Html.RadioButton("searchBy", "keywords", true)&lt;text&gt;keywords&lt;/text&gt;
                  @Html.RadioButton("searchBy", "title")&lt;text&gt;title &lt;/text&gt;
                  @Html.RadioButton("searchBy", "description")&lt;text&gt;description &lt;/text&gt;
                  @Html.RadioButton("searchBy", "links")&lt;text&gt;links&lt;/text&gt;
  
   &lt;div class="panel-body"&gt;
       @Html.TextBox("search", null, new { @class = "form-control" })&lt;span class="input-group-btn"&gt;&lt;/span&gt;
   &lt;/div&gt;
                  &lt;div class="panel-footer"&gt;
  
                      &lt;button id="btnSearch"
                              class="btn btn-sm btn-primary"&gt;
                          &lt;i class="glyphicon glyphicon-search"&gt;&lt;/i&gt;
                          &amp;nbsp;Search
                      &lt;/button&gt;
                      &lt;a href="@Url.Action("Index", "kbs")" class="btn btn-sm btn-primary"&gt;
                          &lt;span class="glyphicon glyphicon-cog" aria-hidden="true"&gt;&lt;/span&gt;
                          Reset&lt;/a&gt;
                          &lt;a href="@Url.Action("Create", "kbs")" class="btn btn-sm btn-primary"&gt;
                              &lt;span class="glyphicon glyphicon-plus-sign" aria-hidden="true"&gt;&lt;/span&gt;
                              Add
  
                          &lt;/a&gt;
  &lt;/div&gt;
  
  
              }
          &lt;/div&gt;
          &lt;/div&gt;
      &lt;/div&gt;
  &lt;!-- ** END SEARCH AREA ** --&gt;
  
  &lt;table class="table"&gt;
      &lt;tr&gt;
          &lt;th&gt;
              @Html.DisplayNameFor(model =&gt; model.First().title)
          &lt;/th&gt;
          &lt;th&gt;
              @Html.DisplayNameFor(model =&gt; model.First().description)
          &lt;/th&gt;
          &lt;th&gt;
              @Html.DisplayNameFor(model =&gt; model.First().keywords)
          &lt;/th&gt;
          &lt;th&gt;
              @Html.DisplayNameFor(model =&gt; model.First().links)
          &lt;/th&gt;
          &lt;th&gt;Modify_KB_Record___&lt;/th&gt;
      &lt;/tr&gt;
  
  @foreach (var item in Model) {
      &lt;tr&gt;
          &lt;td&gt;
              @Html.DisplayFor(modelItem =&gt; item.title)
          &lt;/td&gt;
          &lt;td&gt;
              @Html.DisplayFor(modelItem =&gt; item.description)
          &lt;/td&gt;
          &lt;td&gt;
              @Html.DisplayFor(modelItem =&gt; item.keywords)
          &lt;/td&gt;
          &lt;td&gt;
              &lt;a href="@Html.DisplayFor(modelItem =&gt; item.links)"&gt;@Html.DisplayFor(modelItem =&gt; item.links)&lt;/a&gt;
  
          &lt;/td&gt;
          &lt;td&gt;
              @Html.ActionLink("Edit", "Edit", new { id=item.id }) |
              @Html.ActionLink("Details", "Details", new { id=item.id }) |
              @Html.ActionLink("Delete", "Delete", new { id=item.id })
          &lt;/td&gt;
      &lt;/tr&gt;
  }
  
  &lt;/table&gt;
  @Html.PagedListPager(Model, page =&gt; Url.Action("Index", new { page, searchBy = Request.QueryString["searchBy"], search = Request.QueryString["search"] }),
  new PagedListRenderOptions() { Display = PagedListDisplayMode.IfNeeded, DisplayPageCountAndCurrentLocation = true, DisplayItemSliceAndTotal = true })
  </code></pre>