title: Linq to select data from one table not in other table
body: <p>Hi i have the following code to select data from one table not in other table</p>
  
  <pre><code>var result1 = (from e in db.Users
                 select e).ToList();
  var result2 = (from e in db.Fi
                 select e).ToList();
  List&lt;string&gt; listString = (from e in result1
                             where !(from m in result2
                                     select m.UserID).Contains(e.UserID)
                             select e.UserName).ToList();
  
  ViewBag.ddlUserId = listString;
  </code></pre>
  
  <p>Am getting value inside listString .But got error while adding listString to viewbag.</p>
  
  <pre><code>Unable to cast object of type 'System.Collections.Generic.List`1[System.String]' to type 'System.Collections.Generic.IEnumerable`1[Main.Models.Admin.User]'.
  </code></pre>