I want to get list of countries from database and bind it to dropdown list
<p>Here is my code gives me error while add <code>countrylist</code> to <code>listofcountries</code></p>

<p>ERROR</p>

<blockquote>
  <p>system.collection.generic.list is not assignable to parameter type
  system.web.mvc.selectListitem</p>
</blockquote>

<p>CODE</p>

<pre><code>public List&lt;SelectListItem&gt; Getallcountries()
{
    var listofcountries = new List&lt;SelectListItem&gt;();
    using (var db = new DatabaseContext())
    {
        var countrylist = db.Countries.Where(x =&gt; x.IsActive == true).ToList().Select(x =&gt; new SelectListItem
        {
            Text = x.CountryName,
            Value = Convert.ToString(x.ID)
        });

       listofcountries.Add(countrylist);
    }
    return listofcountries;
}
</code></pre>