title: How to get the View to return the ID via a ViewModel to the controller?
body: <p>I currently have a view which returns an <code>IEnumerable</code> collection of Technicians via the <code>TechnicianViewModel</code>. The view model populates fine and displays the objects correctly. </p>
  
  <p>However, at the moment I need someone to point me in the right direction with regards to selecting a specific technician. </p>
  
  <p>If I was to click <code>More Info</code> on the technician, an <code>[HttpGet]</code> request would be initiated which would result in a queryString. And this is exactly what is against the requirements of this project.(Requirements of the project: no query string should appear in the URL)</p>
  
  <p>Here is the view :- </p>
  
  <pre><code>  @model IEnumerable&lt;ActionAugerMVC.ViewModels.TechnicianViewModel&gt;
    &lt;div class="row"&gt;
          @foreach (var item in Model)
          {
              &lt;div class="col-sm-6 col-md-3"&gt;
                  &lt;div class=""&gt;
                      &lt;div class=""&gt;
                          &lt;div class=""&gt;
                             @item.UserName
                          &lt;/div&gt;
                          &lt;div class=""&gt;
                              Technician
                          &lt;/div&gt;
                      &lt;/div&gt; 
                      &lt;div class=""&gt;
                          &lt;img src="~\imagesurl-@item.GenerateName()" class="img-responsive" alt="..."&gt;
                      &lt;/div&gt;
                      &lt;div class=""&gt;
                          &lt;p class="overlay__desc"&gt;
                             @item.Bio
                          &lt;/p&gt;
                          &lt;ul class="overlay__social"&gt;
                              &lt;li&gt;&lt;a href="#"&gt;&lt;i class="ion-social-twitter"&gt;&lt;/i&gt;&lt;/a&gt;&lt;/li&gt;
                              &lt;li&gt;&lt;a href="#"&gt;&lt;i class="ion-social-facebook"&gt;&lt;/i&gt;&lt;/a&gt;&lt;/li&gt;
                              &lt;li&gt;&lt;a href="#"&gt;&lt;i class="ion-social-skype"&gt;&lt;/i&gt;&lt;/a&gt;&lt;/li&gt;
                              &lt;li&gt;&lt;a href="#"&gt;&lt;i class="ion-social-whatsapp-outline"&gt;&lt;/i&gt;&lt;/a&gt;&lt;/li&gt;
                          &lt;/ul&gt;
                          &lt;a href="@Url.Action("Profile","Technician",new { url = item.GenerateURL() })" class="btn btn-accent"&gt;More info&lt;/a&gt;
  
  
                      &lt;/div&gt; 
                  &lt;/div&gt; 
              &lt;/div&gt;
          }
          &lt;/div&gt; &lt;!-- / .row --&gt;
  </code></pre>
  
  <p>Here is the View Model :-</p>
  
  <pre><code> public class TechnicianViewModel
   {
   public Guid ID { get; set; }
   public string UserName { get; set; }
   public string Bio { get; set; }
   public string GenerateName()
   {
      string str = GenerateURL();
      str = str + ".jpg";
      return str;
   }
   public string GenerateURL()
   {
      string phrase = string.Format("{0}", UserName);
      string str = phrase.ToLower();
      str = Regex.Replace(str, @"\s", "-");
      return str;
   }
  }
  </code></pre>
  
  <p>How can I avoid my controller method being an <code>[HttpGet]</code> as I had implemented here so that I can have the ID from the viewmodel object returned by the view.</p>
  
  <pre><code>        [HttpGet]
      [Route("technician/profile/calgary-{url}")]
      public IActionResult Profile(Guid? ID,string url)
      {
          var Profile = unitOfWork.TechnicianRepository.GetByGuidId(ID);
          return View(Profile);
      }
  </code></pre>