It is simple: Task03Entities.Entites not a collection.
You initialize the object here:
Task03Entities.Entites newViewStateList = new Task03Entities.Entites();
And then try to iterate over it as if it were a collection:
foreach (Task03Entities.Entites item in newViewStateList) { }
I suspect you want something like:
List<Task03Entities.Entites> newViewStateList = new List<Task03Entities.Entites>(); foreach (Task03Entities.Entites item in newViewStateList) {
source share