 <p>Not that familiar with how you query the db, but you probably have iterate over the result set like this:</p> <pre><code>&lt;table&gt; @foreach(var n in nilstock) { &lt;tr&gt;&lt;td&gt;@n.STOCKCODE&lt;/td&gt;&lt;td&gt;@n.TOTALSTOCK&lt;/td&gt;&lt;/tr&gt; } &lt;table&gt; </code></pre>