I have this piece of code:
Reps.Algo _Rep = new Reps.Algo();
Model.Entities.G guia = new Model.Entities.G;
guia = _Rep.GetById(GuiaId);
foreach(var un in guia.Unidades)
{
Do Something
}
When I place it on the Code-Behind it works perfectly, but when I place it in the Source view of the page it says:
"foreach statement cannot operate on variables of type entity collection"
What I'm I missing here???