SyntaxFix
Write A Post
Hire A Developer
Questions
To put it all together, this is what it should look like:
In the controller:
List<Fund> fundList = db.Funds.ToList(); ViewBag.Funds = fundList;
Then in the view:
@foreach (var item in ViewBag.Funds) { <span> @item.FundName </span> }