title: cannot implicitly convert type int to model type
body: <p>I have this query-</p>
  
  <pre><code>  var uploadedfile = (from u in db.CardTables
                                  where u.CardID &lt; cardtable.cardID
                                  select new CardModel {
                                      cardID = cardtable.cardID,
                                      cardDate = cardtable.cardDate,
                                      cardFileName = cardtable.cardFileName,
                                      cardFilePath = cardtable.cardFilePath,
                                      cardHashCode = cardtable.cardHashCode,
                                      cardTitle = cardtable.cardTitle
                                  }).ToList();
  </code></pre>
  
  <p>Where <code>cardID</code> is <code>int</code> type.</p>
  
  <p>I am selecting last record from query match-</p>
  
  <pre><code> CardModel previous = uploadedfile.Select(L =&gt; L.cardID).Last();
  </code></pre>
  
  <p>Where in this above line , this  gives me cannot implicitly convert type <code>int</code> to <code>cardmodel</code>.</p>
  
  <p><strong>I tried converting it into int as-</strong></p>
  
  <pre><code>   CardModel previous = Convert.ToInt32(uploadedfile.Select(L =&gt; L.cardID).Last());
  </code></pre>
  
  <p>I wish to use <code>previous</code> in <code>tuple</code> with other table data as-</p>
  
  <pre><code> var tuple = new Tuple&lt;CardModel, List&lt;TagModel&gt;&gt;(previous, taglist);
          return View(tuple);
  </code></pre>
  
  <p>What is the process of doing this?</p>