title: Orchard CMS: How to get specific Content Item in Controller without ID
body: <p>I just wondering how can I get an specific ContentItem in my controller. </p>
  
  <p>I want to get the specific content Item and then display it's shape on my custom View..
  PS: I also dont know how to get the ID of the content item should i use the ContentManager.Get(ID)</p>
  
  <pre><code>    [HttpGet]
      public ActionResult Index(string jobType, string location) {
  
          var vm = new SearchForJobViewModel();
  
          var items = new List&lt;CustomPart&gt;();
  
          // Load the WhatsAround content items
          IEnumerable&lt;ContentItem&gt; whatsAroundContentItems = ContentManager.Query().ForType("Custom").List();
  
          foreach (ContentItem contentItem in whatsAroundContentItems)
          {
              ContentItemRecord contentItemRecord = contentItem.Record;
              if (contentItem == null)
                  continue;
  
              //CustomPart item = new CustomPart(contentItemRecord.Data);
              //items.Add(item);
          }
  
          //Im also planning to pass the ContentItem in the view and then render it there
          //return View("../JobSearchResults", items.Single(i =&gt; i.Name == "MyContentItem");
          return View("../JobSearchResults", vm);
      }
  </code></pre>
  
  <p>ADDITIONAL</p>
  
  <pre><code>    [Themed]
      [HttpGet]
      public ActionResult Index(string jobType, string location) {
  
          var vm = new SearchForJobViewModel();
  
          vm.SelectedJobType = jobType;
          vm.SelectedLocation = location;
  
          //query all the content items
          IEnumerable&lt;ContentItem&gt; items = ContentManager.Query().List();
  
          foreach (ContentItem contentItem in items) {
  
              ContentItemRecord contentItemRecord = contentItem.Record;
  
              if (contentItem == null)
                  continue;
  
              if (contentItemRecord.ContentType.Name == "CustomPage") {
  
                  // I just painfully search the contents just to get the ID of the specific content item that I want to display
                  // I dont know what table where I can see the ID on the content items
                  if (contentItemRecord.Id == 40) {
                      ContentItem ci = contentItem;
  
                      var test = ci.As&lt;CustomPart&gt;().Scripts; //custom part that I made
  
                      // the body part (raw html from the wysiwg editor)
                      // this I wil render it in my view
                      vm.Body = ci.As&lt;BodyPart&gt;().Text;
  
  
                  }
              }
          }
  
          return View("../JobSearchResults", vm);
      }
  </code></pre>
  
  <p>JobSearchResults.cshtml</p>
  
  <pre><code>     @Html.Raw(Model.Body)
  </code></pre>
  
  <p>It's actually looks wierd but I'm trying something like utilizing Orchard CMS without using  Orchard core (contentpart, drivers,handlers, etc)</p>