I am checking logs of exception and I came across an exception in lazy loading with glass mapper. I have a sitecore project with mvc and one of the views (shared cshtml) contains the following loop:
@foreach(var item in @Model.Collection)...
I would usually write:
@foreach(var item in Model.Collection)...
I tried googling, but I found nothing. I have inherited this code from another guy, who I cannot contact. The website actually loads the page with no error. I've tried the same loop in pure MVC and it loads the page with no Error. However, I get this lazy loading issue that the entity is null there in logs (sitecore).
I will know more tomorrow, but I am curious regarding this. Has anyone came across such issue?