title: System.Web.Mvc.WebViewPage<TModel>.Model.get returned null
body: <p>Home Controller</p>
  
  <pre><code>public ActionResult Index()
  {
      using (MvcDB dataBase = new MvcDB())
      {
  
      }
      return View();
  }
  
  public void DataDoldur()
  {
      using (MvcDB dataBase = new MvcDB())
      {
          Kategori ktgr1 = new Kategori();
          ktgr1.KategoriAdi = "Spor";
          dataBase.Kategori.Add(ktgr1);
  
          dataBase.SaveChanges();
      }
  
  }
  </code></pre>
  
  <p>Index.cshtml
      </p>
  
  <pre><code>&lt;html&gt;
  &lt;head&gt;
      &lt;meta name="viewport" content="width=device-width" /&gt;
      &lt;title&gt;Index&lt;/title&gt;
  &lt;/head&gt;
  &lt;body&gt;
      &lt;div&gt; 
          &lt;div&gt;
              &lt;label&gt;Kategori Seçiniz:&lt;/label&gt;
          &lt;/div&gt;
          &lt;select name="Seçilen Kategori"&gt;
              @foreach (Kategori kategori in Model)
              {
                 &lt;option&gt;@kategori.KategoriAdi&lt;/option&gt; 
              }
          &lt;/select&gt;
          &lt;input type="submit" value="Haberleri Listele " /&gt;
      &lt;/div&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>"System.Web.Mvc.WebViewPage.Model.get returned null" error I get it. what should I do? My database is ready but I cant use it. I think it is true, but does not work. 
  How can I get the foreach to work? Not understanding this.</p>