title: Sitecore using Glass mapper and MVC
body: <p>Hi am using the Glass mapper in combination with Sitecore MVC. I created model below.</p>
  
  <pre><code>using System;
  using System.Collections.Generic;
  using System.Linq;
  using System.Web;
  
  namespace Test
  {
      using Glass.Mapper.Sc.Configuration.Attributes;
  
          [SitecoreType(AutoMap = true)]
          public class GlassTestModel
          {           
              public virtual string Title { get; set; }
          }
      }
  </code></pre>
  
  <p>this is my view</p>
  
  <pre><code>@inherits Glass.Mapper.Sc.Web.Mvc.GlassView&lt;Test.GlassTestModel&gt;
  &lt;div&gt;
  &lt;h2&gt;Hello&lt;/h2&gt;
  &lt;h2&gt;@Model.Title&lt;/h2&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>I also tried this first line </p>
  
  <pre><code>@model Test.GlassTestModel
  </code></pre>
  
  <p>and this one</p>
  
  <pre><code>@inherits System.Web.Mvc.WebViewPage&lt;Test.GlassTestModel&gt;
  </code></pre>
  
  <p>I created a view rendering in Sitecore.  configured the model to use above.
  When I render the view the model fields don't get filled. When I test in a controller I use for other controller view like below:</p>
  
  <pre><code>ISitecoreContext ctx = new SitecoreContext();
  var item = ctx.GetCurrentItem&lt;Test.GlassTestModel&gt;();
  </code></pre>
  
  <p>I do get the title field. Any ideas?</p>