I may have a fundamental misunderstanding of what is going on here, but I\'m having an issue looping through a LinqToSQL class in my razor view:
Ow
You need to import the namespace into your view by adding @using System.Data.Linq at the top of your view. However if you want it in all your views then you need to add to the web.config in your Views folder:
Although not relevent to your question you should really try to move this logic out of the view and into the controller, it will make things much easier to debug and means that your presentation is separated from your business logic.