title: ASP.NET MVC using same view to edit and create
body: <p>I've created a View for editing my Model. The View is strongly-typed and at one point I do the following:</p>
  
  <pre><code>    @for (int i = 0; i &lt; Model.Risks.Count; i++)
      {   
          @Html.EditorFor(m =&gt; Model.Risks[i]))
      }
  </code></pre>
  
  <p>Now, this is working fine if the collection is not null, i.e if I edit an existing Entity.</p>
  
  <p>However I'd like to use this same View for creating a new Entity. But it crashes since the collection is null. How can I make sure it renders the editor ?</p>