title: LINQ: Cannot convert short to short?
body: <p>Cannot implicitly convert type 'short?' to 'short' at <strong><em>LocalAmount = t.EmpNo</em></strong>.  I used <code>Convert.ToInt16(t.EmpNo)</code> but then the <code>'join'</code> clause will get an error and be <code>"incorrect", "type inference failed..."</code></p>
  
  <pre><code>    public class AccountTransaction
      {
          public Int16 LocalAmount { get; set; }
          public String AccountNumber { get; set; }
      }
  
      public static IEnumerable&lt;AccountTransaction&gt; GetAllTransactions()
      {
          using (var context = new SQL_TA_SCOREBOARDEntities1())
          {
              return (from t in context.EmployeeAccesses
                      join acc in context.View_HCM
                           on t.EmpNo equals acc.EmpNo
                      select new AccountTransaction
                      {
                          LocalAmount = t.EmpNo,
                          AccountNumber = acc.EmailAddress
  
                      }).ToList();
          }
      }
  </code></pre>