title: Cannot initialize type 'SelectListItem' with a collection initializer because it does not implement 'System.Collections.IEnumerable'
body: <p>I am trying to create a <code>SelectListItem</code> list to use on my view.</p>
  
  <p>I tried using Linq to pass it to ViewBag like this:</p>
  
  <pre><code>    public ActionResult Create()
      {
          ViewBag.EmailAccounts = db.EmailAccounts.Select(e =&gt; new SelectListItem { e.ID, e.Name });
          return View();
      }
  </code></pre>
  
  <p>But it gives me this error:</p>
  
  <blockquote>
    <p>Cannot initialize type 'SelectListItem' with a collection initializer because it does not implement 'System.Collections.IEnumerable'</p>
  </blockquote>
  
  <p>I got the idea to do it this way from here: <a href="http://odetocode.com/blogs/scott/archive/2013/03/11/dropdownlistfor-with-asp-net-mvc.aspx" rel="nofollow noreferrer">http://odetocode.com/blogs/scott/archive/2013/03/11/dropdownlistfor-with-asp-net-mvc.aspx</a></p>
  
  <p>What concept am I missing here?</p>