title: How to display a collection in View of ASP.NET MVC 4 Razor project?
body: <p>I have the following Model:</p>
  
  <pre><code>public class ContractPlain
  {
      public int Id { get; set; }
      public Guid ContractGuid { get; set; }
      public int SenderId { get; set; }
      public int RecvId { get; set; }
      public int ContractType { get; set; }
      public string ContractStatus { get; set; }
      public DateTime CreatedTime { get; set; }
      public DateTime CreditEnd { get; set; }
  }
  
  public class Contrtacts
  {
      List&lt;ContractPlain&gt; listOutput;
  
      public void Build(List&lt;ContractPlain&gt; listInput)
      {
          listOutput = new List&lt;ContractPlain&gt;();
      }
  
      public List&lt;ContractPlain&gt; GetContracts()
      {
          return listOutput;
      }
  
      internal void Build(List&lt;contract&gt; currentContracts)
      {
          throw new NotImplementedException();
      }
  }
  </code></pre>
  
  <p>As you can see, I defined a whole collection.</p>
  
  <p>Why?</p>
  
  <p>I need to render the data in table for user, because there are several rows which belongs to the exact/unique user (e.g. 20-30 shop items are referred to the single client).</p>
  
  <p>So, I'm getting data from the DB using ADO.NET Entity. The binding question to the model instance in <code>Controller</code> is done and I don't have issues with that, I do with the rendering question only.</p>
  
  <p>I think, it could be used with the <code>@for</code> stuff, but didn't know, how it would be better using especially my custom model.</p>
  
  <p>So, how can I render the data in <code>View</code> using my model?</p>
  
  <p>Thanks!</p>