'Model' does not contain a definition for 'Object"
<p>I'm trying to print out data from an SQL query, but I'm running into error after error.</p>

<p>Bassically what Im trying to do is fetch some data from teachers out of a database, and then make a list of them on my view. However everytime I try to print, I get this error</p>

<blockquote>
  <p>ViewModel' does not contain a definition for 'FirstName' and no
  extension method 'FirstName' accepting a first argument of type
  'ViewModel' could be found.</p>
</blockquote>

<p>Here's my code;</p>

<p><strong>ViewModel</strong></p>

<pre><code>namespace Ability.Models
{
    public class ViewModel
    {
        public virtual IEnumerable&lt;Teacher&gt; Teachers { get; set; }
        public Teacher Teacher { get; set; }

        public virtual IEnumerable&lt;Skill&gt; Skills { get; set; }
        public Skill Skill { get; set; }
    }
}
</code></pre>

<p><strong>Controller</strong></p>

<pre><code>public ActionResult Index()
        {
            string campus = Request.Params["Campus"];

            if (campus != null)
            {
                if (campus == "Alle")
                {
                    var teachers = (from t in db.Teachers
                                    select t);
                }
                else
                {
                    var teachers = (from t in db.Teachers
                                    where t.Campus == campus
                                    select t );
                }
            }
            else
            {
                var teachers = (from t in db.Teachers
                                select t);
            }

            var Model = new ViewModel
            {
                Teachers = db.Teachers.ToList(),
            };

            return View(Model);
        }
</code></pre>

<p><strong>View</strong></p>

<pre><code>@model IEnumerable&lt;Ability.Models.ViewModel&gt;

&lt;h2&gt;Teachers at Thomas More&lt;/h2&gt;


               ...


@foreach (var Teacher in Model)
    {
        &lt;tr&gt;
            &lt;td&gt;
                @Teacher.FirstName
            &lt;/td&gt;
            &lt;td&gt;
                @Teacher.LastName
            &lt;/td&gt;
            &lt;td&gt;
                @Teacher.Email
            &lt;/td&gt;
            &lt;td&gt;
                @Teacher.Campus
            &lt;/td&gt;
        &lt;/tr&gt;
    }
</code></pre>

<p>I'm not sure if it mathers, but I already tried doing several things including changing my loop to</p>

<pre><code>@foreach (var Teacher in Model.Teachers)
</code></pre>

<p>but then I receive a similar error</p>

<blockquote>
  <p>'IEnumerable' does not contain a definition for 'Teachers'
  and no extension method 'Teachers' accepting a first argument of type
  'IEnumerable' could be found</p>
</blockquote>

<p>Looking forward to any help I can receive!</p>